using System;
using System.Collections;
using System.Data;
using System.Data.Common;
using System.Globalization;
using System.Text;
using System.Xml;
using Oracle.ManagedDataAccess.Types;
using OracleInternal.Common;
using OracleInternal.ServiceObjects;
using OracleInternal.TTC.Accessors;

namespace Oracle.ManagedDataAccess.Client
{
	public sealed class OracleDataReader : DbDataReader
	{
		private static string s_replaceString = "\r\n";

		private long m_fetchSize;

		private int m_maxRowSize;

		private int m_initialLongFetchSize;

		private CommandBehavior m_commandBehavior;

		private bool m_bclosed;

		private bool m_bDisposed;

		internal OracleRefCursor m_refCursor;

		private int m_recordsAffected;

		private bool m_bBeginingOfFile = true;

		internal bool m_bEndOfFile;

		private int m_fieldCount;

		internal OracleDataReaderImpl m_readerImpl;

		private OracleConnection m_connection;

		private bool m_bDoneReadOne;

		private bool m_bHasRows;

		internal int m_internalRowCounter = -1;

		private string m_commandText;

		internal bool m_returnPSTypes;

		internal string m_storedProcName;

		private DataTable m_dataTableEx;

		private DataTable m_dataTable;

		private SqlStatementType m_sqlStatementType;

		private bool m_noMoreResults;

		private bool m_fillReader;

		private ArrayList m_dataTableList;

		private bool m_bInternalCall;

		internal Type[] m_expectedColumnTypes;

		internal bool m_isFromEF;

		internal bool m_isFromEFCore;

		internal bool m_bMapNumberToBoolean;

		internal int m_edmMappingMaxBOOL = 1;

		internal bool m_bMapNumberToByte;

		internal int m_edmMappingMaxBYTE = 3;

		internal int m_edmMappingMaxINT16 = 5;

		internal int m_edmMappingMaxINT32 = 10;

		internal int m_edmMappingMaxINT64 = 19;

		private object[] m_LobImplCache;

		private int m_RowNumber;

		private long[] m_LastCachedRowNumber;

		internal ArrayList m_tempLobFromCurrentFetch = new ArrayList();

		private TimeSpan m_LocalTimeAdjustment = TimeSpan.Zero;

		internal OracleBlobImpl m_tempOraBlobImpl;

		internal OracleClobImpl m_tempOraClobImpl;

		internal object m_dataTablesReferenceForFill;

		private int m_currentDataTableIndex = -1;

		private DataTable m_currentDataTableForFill;

		internal bool m_bUseDataSetAsDupStore;

		private int m_initialRowCnt = -1;

		private bool m_isRowAddedToDatatable;

		internal int m_numExplicitBoundRefCursors;

		private object lockDataReader = new object();

		internal bool m_bSuppressGetDecimalInvalidCastException;

		private NumberFormatInfo nfi;

		private string formatNumericCharacters;

		private string formatTimeStamp;

		private string formatTimeStampTZ;

		private string formatDate;

		private static OracleDecimal m_sOracleDecimalWith29Precision = new OracleDecimal(10000000000000000000000000000m);

		public override int Depth
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				return 0;
			}
		}

		public long FetchSize
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				return m_fetchSize;
			}
			set
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (value <= 0)
				{
					throw new ArgumentException();
				}
				m_fetchSize = value;
			}
		}

		public override int FieldCount
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (m_fieldCount <= 0 && m_readerImpl != null && m_readerImpl.m_accessors != null)
				{
					m_fieldCount = m_readerImpl.m_accessors.Length - m_readerImpl.m_numberOfHiddenColumns;
				}
				return m_fieldCount;
			}
		}

		public override bool HasRows
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (!m_bHasRows && !m_bDoneReadOne && Read())
				{
					m_internalRowCounter = -1;
				}
				return m_bHasRows;
			}
		}

		public override int VisibleFieldCount
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (m_fieldCount <= 0 && m_readerImpl != null && m_readerImpl.m_accessors != null)
				{
					m_fieldCount = m_readerImpl.m_accessors.Length - m_readerImpl.m_numberOfHiddenColumns;
				}
				return m_fieldCount;
			}
		}

		public int HiddenFieldCount
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (m_readerImpl == null)
				{
					return 0;
				}
				return m_readerImpl.m_numberOfHiddenColumns;
			}
		}

		public int InitialLONGFetchSize
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (m_readerImpl != null)
				{
					return (int)m_readerImpl.m_initialLongFS;
				}
				return 0;
			}
		}

		public int InitialLOBFetchSize
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (m_readerImpl != null)
				{
					return (int)m_readerImpl.m_clientInitialLOBFS;
				}
				return 0;
			}
		}

		public override bool IsClosed => m_bclosed;

		public override object this[string columnName] => this[GetOrdinal(columnName)];

		public override object this[int i] => GetValue(i);

		public override int RecordsAffected => m_recordsAffected;

		internal int CurrentRow => m_RowNumber;

		public long RowSize => m_maxRowSize;

		internal bool IsFillReader
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				return m_fillReader;
			}
			set
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				m_fillReader = value;
				if (m_fillReader)
				{
					m_dataTableList = new ArrayList();
					DataTable minSchemaTable = GetMinSchemaTable();
					if (minSchemaTable != null)
					{
						m_dataTableList.Add(minSchemaTable);
					}
				}
			}
		}

		internal ArrayList SchemaTables
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				return m_dataTableList;
			}
		}

		internal OracleRefCursor RefCursor
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException();
				}
				return m_refCursor;
			}
			set
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException();
				}
				m_refCursor = value;
			}
		}

		public bool UseEdmMapping => m_isFromEF;

		public bool SuppressGetDecimalInvalidCastException
		{
			get
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException();
				}
				return m_bSuppressGetDecimalInvalidCastException;
			}
			set
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException();
				}
				m_bSuppressGetDecimalInvalidCastException = value;
			}
		}

		internal OracleDataReader(OracleDataReaderImpl readerImpl, OracleConnection connection, long fetchSize, long clientInitialLOBFS, long internalInitialLOBFS, long internalInitialJSONFS, int initialLongFetchSize, int recordsAffected, string commandText, SqlStatementType sqlStatementType, CommandBehavior behavior = CommandBehavior.Default)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.ctor);
			}
			try
			{
				if (sqlStatementType == SqlStatementType.DML)
				{
					m_recordsAffected = recordsAffected;
				}
				else
				{
					m_recordsAffected = -1;
				}
				m_connection = connection;
				m_sqlStatementType = sqlStatementType;
				m_commandBehavior = behavior;
				m_commandText = commandText;
				m_bclosed = false;
				if (readerImpl == null)
				{
					m_bEndOfFile = true;
					return;
				}
				m_readerImpl = readerImpl;
				m_fetchSize = fetchSize;
				readerImpl.m_clientInitialLOBFS = clientInitialLOBFS;
				readerImpl.m_internalInitialLOBFS = internalInitialLOBFS;
				readerImpl.m_internalInitialJSONFS = internalInitialJSONFS;
				m_initialLongFetchSize = initialLongFetchSize;
				if (m_readerImpl.m_sqlMetaData != null)
				{
					m_maxRowSize = m_readerImpl.m_sqlMetaData.m_maxRowSize + m_readerImpl.m_sqlMetaData.m_numOfLOBColumns * Math.Max(86, 86 + (int)clientInitialLOBFS) + m_readerImpl.m_sqlMetaData.m_numOfJSONColumns * Math.Max(86, 86) + m_readerImpl.m_sqlMetaData.m_numOfLONGColumns * Math.Max(2, m_initialLongFetchSize) + m_readerImpl.m_sqlMetaData.m_numOfBFileColumns * 86;
					m_fieldCount = m_readerImpl.m_sqlMetaData.m_noOfColumns - m_readerImpl.m_numberOfHiddenColumns;
					if (m_readerImpl.m_sqlMetaData.HasLOBOrLongColumn)
					{
						m_LobImplCache = new object[m_fieldCount];
						m_LastCachedRowNumber = new long[m_fieldCount];
					}
				}
				nfi = new NumberFormatInfo();
				OracleGlobalization sessionInfo = m_connection.GetSessionInfo();
				formatDate = sessionInfo.DateFormat;
				formatTimeStamp = sessionInfo.TimeStampFormat;
				formatTimeStampTZ = sessionInfo.TimeStampTZFormat;
				formatNumericCharacters = sessionInfo.NumericCharacters;
				nfi.NumberDecimalSeparator = formatNumericCharacters[0].ToString();
				m_readerImpl.OnClose = delegate
				{
					if (!m_bclosed)
					{
						m_readerImpl = null;
						Close();
					}
				};
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.ctor);
				}
			}
		}

		~OracleDataReader()
		{
			try
			{
				Dispose(disposing: false);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.dtor, ex);
			}
		}

		public override void Close()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Close);
			}
			if (m_bclosed)
			{
				return;
			}
			lock (lockDataReader)
			{
				if (m_bclosed)
				{
					return;
				}
				try
				{
					bool flag = false;
					if (m_readerImpl != null)
					{
						if (m_internalRowCounter < m_readerImpl.m_rowsFetched && m_readerImpl.m_sqlMetaData != null && m_readerImpl.m_sqlMetaData.HasLOBColumns)
						{
							if (-1 == m_internalRowCounter)
							{
								m_internalRowCounter++;
							}
							for (int i = m_internalRowCounter; i < m_readerImpl.m_rowsFetched; i++)
							{
								m_readerImpl.CollectTempLOBsToBeFreed(i, m_tempLobFromCurrentFetch);
							}
							RelRefOnAllTempLobs();
						}
						m_readerImpl.Close();
						m_readerImpl = null;
					}
					else
					{
						flag = true;
					}
					m_expectedColumnTypes = null;
					if (m_dataTable != null)
					{
						m_dataTable.Dispose();
						m_dataTable = null;
					}
					if (m_dataTableEx != null)
					{
						m_dataTableEx.Dispose();
						m_dataTableEx = null;
					}
					if (m_dataTablesReferenceForFill != null)
					{
						m_currentDataTableIndex = -1;
						m_currentDataTableForFill = null;
						m_bUseDataSetAsDupStore = false;
						m_dataTablesReferenceForFill = null;
						m_initialRowCnt = -1;
						m_isRowAddedToDatatable = false;
					}
					if (!flag && (m_commandBehavior & CommandBehavior.CloseConnection) == CommandBehavior.CloseConnection)
					{
						try
						{
							m_connection.Close();
						}
						catch
						{
						}
					}
				}
				catch (Exception ex)
				{
					if (ProviderConfig.m_bTraceLevelPublic)
					{
						Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Close, ex.ToString());
					}
				}
				finally
				{
					m_bclosed = true;
					if (!m_bDisposed)
					{
						Dispose();
					}
					if (ProviderConfig.m_bTraceLevelPublic)
					{
						Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Close);
					}
				}
			}
		}

		public new void Dispose()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Dispose);
			}
			try
			{
				Dispose(disposing: true);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Dispose, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Dispose);
				}
			}
		}

		protected override void Dispose(bool disposing)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Dispose);
			}
			if (m_bDisposed)
			{
				return;
			}
			lock (lockDataReader)
			{
				if (m_bDisposed)
				{
					return;
				}
				try
				{
					m_bDisposed = true;
					if (!m_bclosed)
					{
						Close();
					}
				}
				finally
				{
					GC.SuppressFinalize(this);
					if (ProviderConfig.m_bTraceLevelPublic)
					{
						Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Dispose);
					}
				}
			}
		}

		public override short GetInt16(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetInt16);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				if (OraType.ORA_NUMBER != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				byte[] dataByteRep = null;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag = false;
				bool flag2 = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData is short)
					{
						return (short)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = dataByteRep.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				int @int;
				try
				{
					@int = HelperClass.GetInt(dataByteRep, dataOffset, dataLength);
				}
				catch (OverflowException)
				{
					throw new InvalidCastException();
				}
				if (@int > 32767 || @int < -32768)
				{
					throw new InvalidCastException();
				}
				if (flag && !flag2)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, (short)@int, bCopyRawData: true);
				}
				return (short)@int;
			}
			catch (Exception ex2)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetInt16, ex2);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetInt16);
				}
			}
		}

		public override int GetInt32(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetInt32);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				if (OraType.ORA_NUMBER != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				byte[] dataByteRep = null;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag = false;
				bool flag2 = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData is int)
					{
						return (int)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = oraColData.m_rawData.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				int @int;
				try
				{
					@int = HelperClass.GetInt(dataByteRep, dataOffset, dataLength);
				}
				catch (OverflowException)
				{
					throw new InvalidCastException();
				}
				if (flag && !flag2)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, @int, bCopyRawData: true);
				}
				return @int;
			}
			catch (Exception ex2)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetInt32, ex2);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetInt32);
				}
			}
		}

		public override long GetInt64(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetInt64);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (OraType.ORA_NUMBER != internalType && OraType.ORA_INTERVAL_YM != internalType && OraType.ORA_INTERVAL_YM_DTY != internalType)
				{
					throw new InvalidCastException();
				}
				byte[] dataByteRep = null;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag = false;
				bool flag2 = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData is long)
					{
						return (long)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = oraColData.m_rawData.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				long @long;
				if (OraType.ORA_INTERVAL_YM == m_readerImpl.m_accessors[i].m_internalType || OraType.ORA_INTERVAL_YM_DTY == m_readerImpl.m_accessors[i].m_internalType)
				{
					@long = OracleIntervalYM.GetLong(dataByteRep, OracleDbType.IntervalYM, dataOffset, dataLength);
				}
				else
				{
					try
					{
						@long = HelperClass.GetLong(dataByteRep, dataOffset, dataLength);
					}
					catch (OverflowException)
					{
						throw new InvalidCastException();
					}
				}
				if (flag && !flag2)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, @long, bCopyRawData: true);
				}
				return @long;
			}
			catch (Exception ex2)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetInt64, ex2);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetInt64);
				}
			}
		}

		public override decimal GetDecimal(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDecimal);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				byte[] dataByteRep = null;
				decimal num = default(decimal);
				OraColumnData oraColData = null;
				bool flag = false;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag2 = false;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (internalType != OraType.ORA_NUMBER)
				{
					if (!m_isFromEF || (internalType != OraType.ORA_INTERVAL_DS && internalType != OraType.ORA_INTERVAL_DS_DTY && internalType != OraType.ORA_INTERVAL_YM && internalType != OraType.ORA_INTERVAL_YM_DTY))
					{
						throw new InvalidCastException();
					}
					num = ((!flag2 || oraColData.m_netTypeData == null || !(oraColData.m_netTypeData is decimal)) ? ((decimal)GetValue(i)) : ((decimal)oraColData.m_netTypeData));
					if (!flag2 && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, num, bCopyRawData: true);
					}
					return num;
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData is decimal)
					{
						return (decimal)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = oraColData.m_rawData.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				try
				{
					if (m_bSuppressGetDecimalInvalidCastException)
					{
						int precision = DecimalConv.GetPrecision(dataByteRep, dataOffset, dataLength);
						OracleDecimal value = GetOracleDecimal(i);
						if (value >= m_sOracleDecimalWith29Precision || value <= -m_sOracleDecimalWith29Precision)
						{
							value = OracleDecimal.SetPrecision(value, 29);
						}
						else if (precision > 28)
						{
							value = OracleDecimal.SetPrecision(value, 28);
						}
						return value.Value;
					}
					num = DecimalConv.GetDecimal(dataByteRep, dataOffset, dataLength);
				}
				catch (OverflowException)
				{
					throw new InvalidCastException();
				}
				if (!flag2 && flag)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, num, bCopyRawData: true);
				}
				return num;
			}
			catch (Exception ex2)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDecimal, ex2);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDecimal);
				}
			}
		}

		public override double GetDouble(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDouble);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (internalType != OraType.ORA_NUMBER && internalType != OraType.ORA_IBDOUBLE)
				{
					throw new InvalidCastException();
				}
				byte[] dataByteRep = null;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag = false;
				bool flag2 = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is double)
					{
						return (double)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = oraColData.m_rawData.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				double @double = HelperClass.GetDouble(internalType, dataByteRep, dataOffset, dataLength);
				if (flag && !flag2)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, @double, bCopyRawData: true);
				}
				return @double;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDouble, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDouble);
				}
			}
		}

		public override float GetFloat(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetFloat);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (internalType != OraType.ORA_NUMBER && internalType != OraType.ORA_IBFLOAT)
				{
					throw new InvalidCastException();
				}
				byte[] dataByteRep = null;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag = false;
				bool flag2 = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is float)
					{
						return (float)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = oraColData.m_rawData.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				float @float = HelperClass.GetFloat(internalType, dataByteRep, dataOffset, dataLength);
				if (flag && !flag2)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, @float, bCopyRawData: true);
				}
				return @float;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetFloat, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetFloat);
				}
			}
		}

		public override string GetString(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetString);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (internalType != OraType.ORA_CHAR && internalType != OraType.ORA_CHARN && internalType != OraType.ORA_LONG && internalType != OraType.ORA_UROWID && internalType != OraType.ORA_ROWID && internalType != OraType.ORA_OCICLobLocator && internalType != OraType.ORA_OCIJSON && internalType != OraType.ORA_INTY && internalType != OraType.ORA_DATE && internalType != OraType.ORA_TIMESTAMP && internalType != OraType.ORA_TIMESTAMP_DTY && internalType != OraType.ORA_TIMESTAMP_TZ && internalType != OraType.ORA_TIMESTAMP_TZ_DTY && internalType != OraType.ORA_TIMESTAMP_LTZ && internalType != OraType.ORA_TIMESTAMP_LTZ_DTY && internalType != OraType.ORA_NUMBER && internalType != OraType.ORA_FLOAT && internalType != OraType.ORA_IBFLOAT && internalType != OraType.ORA_IBDOUBLE && internalType != OraType.ORA_INTERVAL_DS && internalType != OraType.ORA_INTERVAL_DS_DTY && internalType != OraType.ORA_INTERVAL_YM && internalType != OraType.ORA_INTERVAL_YM_DTY)
				{
					throw new InvalidCastException();
				}
				string text = string.Empty;
				if (OraType.ORA_LONG == internalType)
				{
					text = (m_readerImpl.IsCompleteDataForLongAvailable(m_internalRowCounter, i) ? ((TTCLongAccessor)m_readerImpl.m_accessors[i]).GetString(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i) : GetLongData(m_connection, m_internalRowCounter, i, -1));
				}
				else
				{
					switch (internalType)
					{
					case OraType.ORA_OCICLobLocator:
					{
						byte[] lobLocator = null;
						object obj = m_LobImplCache[i];
						if (!m_fillReader && m_LobImplCache != null && obj != null && m_LastCachedRowNumber[i] == m_RowNumber)
						{
							lobLocator = ((OracleClobImpl)obj).m_lobLocator;
						}
						text = ((!m_connection.m_isDb11gR1OrHigher || ((m_fillReader || -1 != m_readerImpl.m_clientInitialLOBFS) && (!m_fillReader || m_returnPSTypes))) ? OracleClobImpl.GetCompleteClobData(m_internalRowCounter, i, m_connection.m_oracleConnectionImpl, lobLocator, m_readerImpl.m_dataUnmarshaller, (TTCLobAccessor)m_readerImpl.m_accessors[i], ref m_tempOraClobImpl) : OracleClobImpl.GetCompleteClobData(m_internalRowCounter, m_readerImpl.m_dataUnmarshaller, m_connection.m_oracleConnectionImpl, lobLocator, (TTCLobAccessor)m_readerImpl.m_accessors[i]));
						break;
					}
					case OraType.ORA_OCIJSON:
						_ = string.Empty;
						return OracleJsonImpl.GetJsonString(m_internalRowCounter, i, m_connection.m_oracleConnectionImpl, null, m_readerImpl.m_dataUnmarshaller, (TTCJsonAccessor)m_readerImpl.m_accessors[i], ref m_tempOraBlobImpl);
					default:
					{
						if (OraType.ORA_INTY == internalType)
						{
							OracleXmlTypeImpl oracleXmlTypeImpl = new OracleXmlTypeImpl(m_connection.m_oracleConnectionImpl, (TTCXmlTypeAccessor)m_readerImpl.m_accessors[i], m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
							oracleXmlTypeImpl.Initialize(m_connection);
							return oracleXmlTypeImpl.GetString();
						}
						if (OraType.ORA_NUMBER == internalType || OraType.ORA_FLOAT == internalType || OraType.ORA_IBFLOAT == internalType || OraType.ORA_IBDOUBLE == internalType)
						{
							text = GetNumberString(i);
							break;
						}
						if (OraType.ORA_DATE == internalType || OraType.ORA_TIMESTAMP == internalType || OraType.ORA_TIMESTAMP_DTY == internalType || OraType.ORA_TIMESTAMP_TZ == internalType || OraType.ORA_TIMESTAMP_TZ_DTY == internalType || OraType.ORA_TIMESTAMP_LTZ == internalType || OraType.ORA_TIMESTAMP_LTZ_DTY == internalType)
						{
							text = GetDateTimeString(i);
							break;
						}
						if (OraType.ORA_INTERVAL_DS == internalType || OraType.ORA_INTERVAL_DS_DTY == internalType || OraType.ORA_INTERVAL_YM == internalType || OraType.ORA_INTERVAL_YM_DTY == internalType)
						{
							text = GetIntervalString(i);
							break;
						}
						OraColumnData oraColData = null;
						bool flag = false;
						if (!m_isRowAddedToDatatable)
						{
							flag = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
						}
						if (flag)
						{
							if (oraColData.m_netTypeData is string)
							{
								text = (string)oraColData.m_netTypeData;
							}
							else if (oraColData.m_rawData != null)
							{
								Accessor accessor = m_readerImpl.m_accessors[i];
								text = accessor.GetString(oraColData.m_rawData, 0, oraColData.m_rawData.Length, (byte)accessor.m_colMetaData.m_characterSetForm, m_readerImpl.m_dataUnmarshaller.m_charArrayForConversion);
							}
						}
						if (!flag)
						{
							Accessor accessor2 = m_readerImpl.m_accessors[i];
							text = accessor2.GetString(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, (byte)accessor2.m_colMetaData.m_characterSetForm);
						}
						if (!m_bUseDataSetAsDupStore && !flag && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
						{
							m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, null, text, bCopyRawData: true);
						}
						break;
					}
					}
				}
				return text;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetString, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetString);
				}
			}
		}

		private string GetNumberString(int i)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetNumberString);
			}
			try
			{
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				byte[] dataByteRep = null;
				string text = null;
				OraColumnData oraColData = null;
				bool flag = false;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag2 = false;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData is string)
					{
						return (string)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = oraColData.m_rawData.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				if (OraType.ORA_NUMBER != internalType && OraType.ORA_FLOAT != internalType)
				{
					text = ((OraType.ORA_IBFLOAT != internalType) ? HelperClass.GetDouble(internalType, dataByteRep, dataOffset, dataLength).ToString(nfi) : HelperClass.GetFloat(internalType, dataByteRep, dataOffset, dataLength).ToString(nfi));
				}
				else
				{
					byte[] array = new byte[dataLength];
					Array.Copy(dataByteRep, dataOffset, array, 0, dataLength);
					text = DecimalConv.ToString(array, formatNumericCharacters[0]);
				}
				if (!flag2 && flag)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, text, bCopyRawData: true);
				}
				return text;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetNumberString, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetNumberString);
				}
			}
		}

		private string GetDateTimeString(int i)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDateTimeString);
			}
			OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
			try
			{
				byte[] dataByteRep = null;
				string text = null;
				OraColumnData oraColData = null;
				bool flag = false;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag2 = false;
				bool flag3 = true;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is string)
					{
						return (string)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = dataByteRep.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
						flag3 = false;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				if (dataByteRep != null)
				{
					switch (internalType)
					{
					case OraType.ORA_TIMESTAMP_TZ_DTY:
					case OraType.ORA_TIMESTAMP_TZ:
						text = ((!m_connection.m_oracleConnectionImpl.IsTZDataSentAsLocalTime) ? DateTimeConv.ToString(dataByteRep, flag3, TSType.LocalTimeTZ, formatTimeStampTZ, dataOffset, dataLength) : DateTimeConv.ToString(dataByteRep, flag3, TSType.LocalTimeTZ, formatTimeStampTZ, dataOffset, dataLength, addTZOffset: false));
						break;
					case OraType.ORA_TIMESTAMP_LTZ_DTY:
					case OraType.ORA_TIMESTAMP_LTZ:
					{
						byte[] byteRep = null;
						DateTime? dateObj = null;
						OracleTimeZoneInfo? dBTimeZoneBytes = m_connection.m_oracleConnectionImpl.GetDBTimeZoneBytes();
						if (flag3)
						{
							byte[] array = new byte[11];
							Array.Copy(dataByteRep, dataOffset, array, 0, dataLength);
							TimeStamp.ConvertDBTimeToLTZData(array, dBTimeZoneBytes, m_readerImpl.m_sessionTimeZone, out byteRep, out dateObj);
						}
						else
						{
							TimeStamp.ConvertDBTimeToLTZData(dataByteRep, dBTimeZoneBytes, m_readerImpl.m_sessionTimeZone, out byteRep, out dateObj);
						}
						text = DateTimeConv.ToString(byteRep, bCopyData: false, TSType.TimeStampLTZ, formatTimeStamp);
						break;
					}
					case OraType.ORA_TIMESTAMP_DTY:
					case OraType.ORA_TIMESTAMP:
						text = DateTimeConv.ToString(dataByteRep, bCopyData: true, TSType.TimeStamp, formatTimeStamp, dataOffset, dataLength);
						break;
					default:
						text = DateTimeConv.ToString(dataByteRep, dataOffset, dataLength, formatDate);
						break;
					}
				}
				if (flag && !flag2)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, text, bCopyRawData: true);
				}
				return text;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDateTimeString, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDateTimeString);
				}
			}
		}

		private string GetIntervalString(int i)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetIntervalString);
			}
			try
			{
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				byte[] array = null;
				string text = null;
				bool flag = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is string)
					{
						return (string)oraColData.m_netTypeData;
					}
					array = oraColData.m_rawData;
				}
				else
				{
					array = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
				}
				if (array != null)
				{
					if (internalType == OraType.ORA_INTERVAL_DS || internalType == OraType.ORA_INTERVAL_DS_DTY)
					{
						int precision = m_readerImpl.m_accessors[i].m_colMetaData.m_precision;
						int scale = m_readerImpl.m_accessors[i].m_colMetaData.m_scale;
						text = TimeSpanConv.ToString(array, precision, scale);
					}
					else
					{
						int precision2 = m_readerImpl.m_accessors[i].m_colMetaData.m_precision;
						text = TimeSpanConv.ToString(array, precision2);
					}
				}
				if (!m_bUseDataSetAsDupStore && !flag && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, array, text, bCopyRawData: true);
				}
				return text;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetIntervalString, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetIntervalString);
				}
			}
		}

		public TimeSpan GetTimeSpan(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetTimeSpan);
			}
			try
			{
				if (OraType.ORA_INTERVAL_DS != m_readerImpl.m_accessors[i].m_internalType && OraType.ORA_INTERVAL_DS_DTY != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				TimeSpan minValue = TimeSpan.MinValue;
				byte[] dataByteRep = null;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag = false;
				bool flag2 = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is TimeSpan)
					{
						return (TimeSpan)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = dataByteRep.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				minValue = OracleIntervalDS.GetTimeSpan(dataByteRep, OracleDbType.IntervalDS, dataOffset, dataLength);
				if (flag && !flag2)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, minValue, bCopyRawData: true);
				}
				return minValue;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetTimeSpan, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetTimeSpan);
				}
			}
		}

		public override bool GetBoolean(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetBoolean);
			}
			try
			{
				if (m_isFromEF)
				{
					object value = GetValue(i);
					Type type = value.GetType();
					if (type == typeof(bool))
					{
						return (bool)value;
					}
					if (type == typeof(DBNull))
					{
						return false;
					}
					return ((decimal)value > 0m) ? true : false;
				}
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				OraType dataType = (OraType)m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i].m_dataType;
				if (dataType == OraType.ORA_NUMBER || dataType == OraType.ORA_IBDOUBLE || dataType == OraType.ORA_IBFLOAT || dataType == OraType.ORA_SB1 || dataType == OraType.ORA_SB1 || dataType == OraType.ORA_SB1 || dataType == OraType.ORA_FLOAT || dataType == OraType.ORA_VARNUM || dataType == OraType.ORA_BFLOAT || dataType == OraType.ORA_BDOUBLE || dataType == OraType.ORA_UINT)
				{
					object value2 = GetValue(i);
					if (value2.GetType() == typeof(bool))
					{
						return (bool)value2;
					}
					return (Convert.ToDouble(value2) != 0.0) ? true : false;
				}
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetBoolean, " DataType = " + dataType);
				}
				throw new InvalidCastException();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetBoolean, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetBoolean);
				}
			}
		}

		public override byte GetByte(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetByte);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				if (OraType.ORA_NUMBER != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				byte b = 0;
				byte[] dataByteRep = null;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag = false;
				bool flag2 = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData is byte)
					{
						return (byte)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = oraColData.m_rawData.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				int @int;
				try
				{
					@int = HelperClass.GetInt(dataByteRep, dataOffset, dataLength);
				}
				catch (OverflowException)
				{
					throw new InvalidCastException();
				}
				if (@int > 255 || @int < 0)
				{
					throw new InvalidCastException();
				}
				b = (byte)@int;
				if (flag && !flag2)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, b, bCopyRawData: false);
				}
				return b;
			}
			catch (Exception ex2)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetByte, ex2);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetByte);
				}
			}
		}

		public override long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferOffset, int length)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetBytes);
			}
			try
			{
				return GetBytesInternal(i, fieldOffset, buffer, bufferOffset, length, bThrowException: true);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetBytes, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetBytes);
				}
			}
		}

		internal long GetBytesInternal(int i, long fieldOffset, byte[] buffer, int bufferOffset, int length, bool bThrowException)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetBytesInternal);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (buffer != null)
				{
					if (bufferOffset < 0 || bufferOffset > buffer.Length)
					{
						throw new ArgumentOutOfRangeException("bufferOffset");
					}
					if (bufferOffset + length > buffer.Length)
					{
						throw new ArgumentOutOfRangeException(null, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_DATA_REQ));
					}
					if (length < 0)
					{
						throw new ArgumentOutOfRangeException();
					}
					if (length == 0 || fieldOffset < 0)
					{
						return 0L;
					}
				}
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (internalType != OraType.ORA_LONGRAW && internalType != OraType.ORA_RAW && internalType != OraType.ORA_OCIBLobLocator && internalType != OraType.ORA_OCIBFileLocator)
				{
					throw new InvalidCastException();
				}
				if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					if (!bThrowException)
					{
						return -1L;
					}
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				long num = 0L;
				if (OraType.ORA_LONGRAW == internalType)
				{
					int internalRowCounter = m_internalRowCounter;
					TTCLongAccessor tTCLongAccessor = m_readerImpl.m_accessors[i] as TTCLongAccessor;
					num = ((!tTCLongAccessor.IsCompleteDataAvailable(internalRowCounter)) ? GetLongRawData(m_connection, internalRowCounter, i, fieldOffset, ref buffer, bufferOffset, length, bAllocateBuffer: false) : ((buffer != null) ? tTCLongAccessor.GetBytes(m_readerImpl.m_dataUnmarshaller, internalRowCounter, i, fieldOffset, buffer, bufferOffset, length) : tTCLongAccessor.m_totalLengthOfData[internalRowCounter]));
				}
				else if (OraType.ORA_OCIBLobLocator == internalType)
				{
					bool bLOBArrayReadDone = false;
					byte[] lobLocator = null;
					object obj = m_LobImplCache[i];
					if (!m_fillReader && m_LobImplCache != null && obj != null && m_LastCachedRowNumber[i] == m_RowNumber)
					{
						lobLocator = ((OracleBlobImpl)obj).m_lobLocator;
					}
					if (m_connection.m_isDb11gR1OrHigher && ((!m_fillReader && -1 == m_readerImpl.m_clientInitialLOBFS) || (m_fillReader && !m_returnPSTypes)))
					{
						bLOBArrayReadDone = true;
					}
					num = m_readerImpl.GetBytes(m_internalRowCounter, i, fieldOffset, buffer, bufferOffset, length, lobLocator, bLOBArrayReadDone, ref m_tempOraBlobImpl);
				}
				else
				{
					OraColumnData oraColData = null;
					bool flag = false;
					if (!m_isRowAddedToDatatable)
					{
						flag = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
					}
					if (flag)
					{
						if (oraColData.m_rawData != null)
						{
							byte[] rawData = oraColData.m_rawData;
							if (buffer == null)
							{
								num = rawData.Length;
							}
							else
							{
								num = ((rawData.Length < length) ? rawData.Length : length);
								for (int j = 0; j < num; j++)
								{
									buffer[bufferOffset + j] = rawData[j];
								}
							}
						}
					}
					else
					{
						num = m_readerImpl.GetBytes(m_connection, m_internalRowCounter, i, fieldOffset, buffer, bufferOffset, length);
					}
				}
				return num;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetBytesInternal, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetBytesInternal);
				}
			}
		}

		public override char GetChar(int i)
		{
			throw new NotSupportedException();
		}

		public override long GetChars(int i, long fieldOffset, char[] buffer, int bufferOffset, int length)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetChars);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (buffer != null)
				{
					if (bufferOffset < 0 || bufferOffset > buffer.Length)
					{
						throw new ArgumentOutOfRangeException("bufferOffset");
					}
					if (bufferOffset + length > buffer.Length)
					{
						throw new ArgumentOutOfRangeException(null, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_DATA_REQ));
					}
					if (length < 0)
					{
						throw new ArgumentOutOfRangeException();
					}
					if (length == 0 || fieldOffset < 0)
					{
						return 0L;
					}
				}
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (internalType != OraType.ORA_CHAR && internalType != OraType.ORA_CHARN && internalType != OraType.ORA_LONG && internalType != OraType.ORA_UROWID && internalType != OraType.ORA_ROWID && internalType != OraType.ORA_OCICLobLocator)
				{
					throw new InvalidCastException();
				}
				if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				long num = 0L;
				if (OraType.ORA_LONG == internalType)
				{
					int currentRow = m_internalRowCounter;
					int columnIndex = i;
					TTCLongAccessor tTCLongAccessor = m_readerImpl.m_accessors[columnIndex] as TTCLongAccessor;
					if (tTCLongAccessor.IsCompleteDataAvailable(currentRow))
					{
						num = tTCLongAccessor.GetChars(m_readerImpl.m_dataUnmarshaller, currentRow, columnIndex, fieldOffset, buffer, bufferOffset, length);
					}
					else if (buffer != null && length + fieldOffset <= tTCLongAccessor.AvailableDataSize(m_internalRowCounter))
					{
						num = tTCLongAccessor.GetChars(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, columnIndex, fieldOffset, buffer, bufferOffset, length);
					}
					else
					{
						DataUnmarshaller dtUnmarshaller = null;
						tTCLongAccessor = GetLongAccessorToFetchMoreData(m_connection, ref currentRow, ref columnIndex, length, out dtUnmarshaller);
						num = tTCLongAccessor.GetChars(dtUnmarshaller, currentRow, columnIndex, fieldOffset, buffer, bufferOffset, length);
					}
				}
				else if (OraType.ORA_OCICLobLocator == internalType)
				{
					bool bLOBArrayReadDone = false;
					byte[] lobLocator = null;
					object obj = m_LobImplCache[i];
					if (!m_fillReader && m_LobImplCache != null && obj != null && m_LastCachedRowNumber[i] == m_RowNumber)
					{
						lobLocator = ((OracleClobImpl)obj).m_lobLocator;
					}
					if (m_connection.m_isDb11gR1OrHigher && ((!m_fillReader && -1 == m_readerImpl.m_clientInitialLOBFS) || (m_fillReader && !m_returnPSTypes)))
					{
						bLOBArrayReadDone = true;
					}
					num = m_readerImpl.GetChars(m_internalRowCounter, i, fieldOffset, buffer, bufferOffset, length, lobLocator, bLOBArrayReadDone, ref m_tempOraClobImpl);
				}
				else
				{
					OraColumnData oraColData = null;
					bool flag = false;
					if (!m_isRowAddedToDatatable)
					{
						flag = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
					}
					if (flag)
					{
						if (oraColData.m_netTypeData is string)
						{
							string text = (string)oraColData.m_netTypeData;
							if (buffer == null)
							{
								num = text.Length;
							}
							else
							{
								num = ((text.Length < length) ? text.Length : length);
								for (int j = 0; j < num; j++)
								{
									buffer[bufferOffset + j] = text[j];
								}
							}
						}
						else if (oraColData.m_netTypeData is char[])
						{
							char[] array = (char[])oraColData.m_netTypeData;
							if (buffer == null)
							{
								num = array.Length;
							}
							else
							{
								num = ((array.Length < length) ? array.Length : length);
								for (int k = 0; k < num; k++)
								{
									buffer[bufferOffset + k] = array[k];
								}
							}
						}
						else if (oraColData.m_rawData != null)
						{
							m_readerImpl.m_accessors[i].GetCharsFromBuffer(oraColData.m_rawData, oraColData.m_rawData.Length, fieldOffset, buffer, bufferOffset, length, (byte)m_readerImpl.m_accessors[i].m_colMetaData.m_characterSetForm);
						}
					}
					else
					{
						num = m_readerImpl.GetChars(m_connection, m_internalRowCounter, i, fieldOffset, buffer, bufferOffset, length);
						if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1 && m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i))
						{
							Accessor accessor = m_readerImpl.m_accessors[i];
							string @string = accessor.GetString(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, (byte)accessor.m_colMetaData.m_characterSetForm);
							m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, null, @string, bCopyRawData: true);
						}
					}
				}
				return num;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetChars, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetChars);
				}
			}
		}

		public override DateTime GetDateTime(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDateTime);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (internalType != OraType.ORA_TIMESTAMP && internalType != OraType.ORA_TIMESTAMP_LTZ && internalType != OraType.ORA_TIMESTAMP_TZ && internalType != OraType.ORA_DATE && internalType != OraType.ORA_TIMESTAMP_DTY && internalType != OraType.ORA_TIMESTAMP_TZ_DTY && internalType != OraType.ORA_TIMESTAMP_LTZ_DTY)
				{
					throw new InvalidCastException();
				}
				byte[] dataByteRep = null;
				DateTime dateTime = DateTime.MinValue;
				OraColumnData oraColData = null;
				bool flag = false;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag2 = false;
				DateTime? dateObj = null;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is DateTime)
					{
						return (DateTime)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = dataByteRep.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				if (dataByteRep != null)
				{
					switch (internalType)
					{
					case OraType.ORA_TIMESTAMP_TZ_DTY:
					case OraType.ORA_TIMESTAMP_TZ:
						if (m_connection.m_oracleConnectionImpl.IsTZDataSentAsLocalTime)
						{
							byte[] utcArray = null;
							byte[] array2 = new byte[13];
							Array.Copy(dataByteRep, dataOffset, array2, 0, dataLength);
							TimeStamp.GetUTCByteRepFromLocalArray(array2, out utcArray, out dateObj, returnAsDateTime: true);
							dateTime = dateObj.Value;
						}
						else
						{
							dateTime = DateTimeConv.ToDateTime(dataByteRep, internalType != OraType.ORA_TIMESTAMP_TZ && internalType != OraType.ORA_TIMESTAMP_TZ_DTY, dataOffset, dataLength);
						}
						break;
					case OraType.ORA_TIMESTAMP_LTZ_DTY:
					case OraType.ORA_TIMESTAMP_LTZ:
					{
						OracleTimeZoneInfo? dBTimeZoneBytes = m_connection.m_oracleConnectionImpl.GetDBTimeZoneBytes();
						byte[] byteRep = null;
						byte[] array = new byte[11];
						Array.Copy(dataByteRep, dataOffset, array, 0, dataLength);
						TimeStamp.ConvertDBTimeToLTZData(array, dBTimeZoneBytes, m_readerImpl.m_sessionTimeZone, out byteRep, out dateObj, returnAsDateTimeObj: true);
						dateTime = dateObj.Value;
						break;
					}
					default:
						dateTime = DateTimeConv.ToDateTime(dataByteRep, internalType != OraType.ORA_TIMESTAMP_TZ && internalType != OraType.ORA_TIMESTAMP_TZ_DTY, dataOffset, dataLength);
						break;
					}
				}
				if (flag && !flag2)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, dateTime, bCopyRawData: true);
				}
				return dateTime;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDateTime, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDateTime);
				}
			}
		}

		public DateTimeOffset GetDateTimeOffset(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDateTimeOffset);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (internalType != OraType.ORA_TIMESTAMP_TZ && internalType != OraType.ORA_TIMESTAMP_TZ_DTY)
				{
					throw new InvalidCastException();
				}
				OracleTimeStampTZ oracleTimeStampTZ = OracleTimeStampTZ.Null;
				byte[] dataByteRep = null;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag = true;
				bool flag2 = false;
				bool flag3 = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag3 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag3)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is OracleTimeStampTZ)
					{
						return new DateTimeOffset(((OracleTimeStampTZ)oraColData.m_netTypeData).Value, ((OracleTimeStampTZ)oraColData.m_netTypeData).GetTimeZoneOffset());
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = dataByteRep.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag2 = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag2)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
						flag = false;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				if (dataByteRep != null)
				{
					if (!m_connection.m_oracleConnectionImpl.IsTZDataSentAsLocalTime)
					{
						oracleTimeStampTZ = new OracleTimeStampTZ(dataByteRep, flag, dataOffset, dataLength);
					}
					else
					{
						byte[] utcArray = null;
						DateTime? dateObj = null;
						if (flag)
						{
							byte[] array = new byte[13];
							Array.Copy(dataByteRep, dataOffset, array, 0, dataLength);
							TimeStamp.GetUTCByteRepFromLocalArray(array, out utcArray, out dateObj);
						}
						else
						{
							TimeStamp.GetUTCByteRepFromLocalArray(dataByteRep, out utcArray, out dateObj);
						}
						oracleTimeStampTZ = new OracleTimeStampTZ(utcArray, bCopyData: false, 0, dataLength);
					}
				}
				if (flag2 && !flag3)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, oracleTimeStampTZ, bCopyRawData: true);
				}
				return new DateTimeOffset(oracleTimeStampTZ.Value, oracleTimeStampTZ.GetTimeZoneOffset());
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDateTimeOffset, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDateTimeOffset);
				}
			}
		}

		public override Guid GetGuid(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetGuid);
			}
			try
			{
				if (m_isFromEF)
				{
					return (Guid)GetValue(i);
				}
				if (!m_bInternalCall && IsDBNull(i))
				{
					throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
				}
				return new Guid((byte[])GetValue(i));
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetGuid, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetGuid);
				}
			}
		}

		public new DbDataReader GetData(int i)
		{
			throw new NotSupportedException();
		}

		public override string GetDataTypeName(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDataTypeName);
			}
			try
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				return GetOraDbType(i).ToString();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDataTypeName, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetDataTypeName);
				}
			}
		}

		public override IEnumerator GetEnumerator()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetEnumerator);
			}
			try
			{
				bool closeReader = false;
				if ((m_commandBehavior & CommandBehavior.CloseConnection) == CommandBehavior.CloseConnection)
				{
					closeReader = true;
				}
				return new DbEnumerator(this, closeReader);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetEnumerator, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetEnumerator);
				}
			}
		}

		public override Type GetFieldType(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetFieldType);
			}
			Type type = null;
			try
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_readerImpl.m_sqlMetaData.m_fieldTypes != null)
				{
					if (null != (type = m_readerImpl.m_sqlMetaData.m_fieldTypes[i]))
					{
						return type;
					}
				}
				else
				{
					m_readerImpl.m_sqlMetaData.m_fieldTypes = new Type[m_fieldCount];
				}
				ColumnDescribeInfo columnDescribeInfo = m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i];
				OraType dataType = (OraType)columnDescribeInfo.m_dataType;
				type = (Type)OracleTypeMapper.m_OraToNET[dataType];
				if (dataType == OraType.ORA_INTY)
				{
					type = ((!columnDescribeInfo.bIsXmlType) ? typeof(object) : typeof(string));
				}
				else if (type == typeof(decimal))
				{
					int scale = columnDescribeInfo.m_scale;
					int precision = columnDescribeInfo.m_precision;
					if (scale <= 0 && precision - scale < 5)
					{
						type = typeof(short);
					}
					else if (scale <= 0 && precision - scale < 10)
					{
						type = typeof(int);
					}
					else if (scale <= 0 && precision - scale < 19)
					{
						type = typeof(long);
					}
					else if (precision < 8 && ((scale <= 0 && precision - scale <= 38) || (scale > 0 && scale <= 44)))
					{
						type = typeof(float);
					}
					else if (precision < 16)
					{
						type = typeof(double);
					}
				}
				m_readerImpl.m_sqlMetaData.m_fieldTypes[i] = type;
				return type;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetFieldType, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetFieldType);
				}
			}
		}

		public override string GetName(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetName);
			}
			try
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_readerImpl.m_sqlMetaData != null && m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i] != null)
				{
					return m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i].pColAlias;
				}
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetName, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetName);
				}
			}
			return null;
		}

		public OracleBinary GetOracleBinary(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBinary);
			}
			try
			{
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (internalType != OraType.ORA_LONGRAW && internalType != OraType.ORA_RAW && internalType != OraType.ORA_OCIBLobLocator && internalType != OraType.ORA_OCIBFileLocator)
				{
					throw new InvalidCastException();
				}
				if (IsDBNull(i))
				{
					return OracleBinary.Null;
				}
				return new OracleBinary((byte[])GetValue(i));
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBinary, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBinary);
				}
			}
		}

		public OracleBFile GetOracleBFile(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBFile);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (OraType.ORA_OCIBFileLocator != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (!m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					byte[] lobLocator = m_readerImpl.GetLobLocator(m_internalRowCounter, i);
					if (lobLocator != null)
					{
						return new OracleBFile(m_connection, lobLocator);
					}
					return OracleBFile.Null;
				}
				return OracleBFile.Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBFile, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBFile);
				}
			}
		}

		public OracleBlob GetOracleBlob(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBlob);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (OraType.ORA_OCIBLobLocator != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (-1 == m_readerImpl.m_clientInitialLOBFS && ConfigBaseClass.m_bLegacyNegativeOneILFSBehavior)
				{
					throw new InvalidCastException();
				}
				if (!m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					OracleBlob oracleBlob = null;
					if (!m_fillReader && m_LobImplCache != null && m_LobImplCache[i] != null && m_LastCachedRowNumber[i] == m_RowNumber)
					{
						OracleBlobImpl oracleBlobImpl = (OracleBlobImpl)m_LobImplCache[i];
						if (oracleBlobImpl.m_isTemporaryLob && !oracleBlobImpl.m_doneTempLobCreate)
						{
							oracleBlobImpl.CreateTemporaryLob();
							oracleBlobImpl.m_doneTempLobCreate = true;
						}
						oracleBlob = new OracleBlob(m_connection, oracleBlobImpl);
						oracleBlobImpl.AddRef();
					}
					else
					{
						OracleBlobImpl oracleBlobImpl2 = ((!m_connection.m_isDb11gR1OrHigher || ((m_fillReader || -1 != m_readerImpl.m_clientInitialLOBFS) && (!m_fillReader || m_returnPSTypes))) ? new OracleBlobImpl(m_connection.m_oracleConnectionImpl, (TTCLobAccessor)m_readerImpl.m_accessors[i], m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i) : new OracleBlobImpl(m_internalRowCounter, m_connection.m_oracleConnectionImpl, (TTCLobAccessor)m_readerImpl.m_accessors[i]));
						if (oracleBlobImpl2.m_isTemporaryLob && !oracleBlobImpl2.IsQuasiLobLocator)
						{
							OracleBlobImpl oracleBlobImpl3 = (OracleBlobImpl)oracleBlobImpl2.m_connectionImpl.TemporaryLobReferenceGet(oracleBlobImpl2.m_lobId);
							if (oracleBlobImpl3 != null)
							{
								oracleBlob = new OracleBlob(m_connection, oracleBlobImpl3);
								oracleBlobImpl3.AddRef();
							}
							else
							{
								oracleBlobImpl2.m_connectionImpl.TemporaryLobReferenceAdd(oracleBlobImpl2.m_lobId, oracleBlobImpl2);
								m_tempLobFromCurrentFetch.Add(oracleBlobImpl2);
								oracleBlobImpl2.AddRef();
								oracleBlob = new OracleBlob(m_connection, oracleBlobImpl2);
							}
						}
						else
						{
							oracleBlob = new OracleBlob(m_connection, oracleBlobImpl2);
						}
						if (!m_fillReader && m_LobImplCache != null)
						{
							m_LobImplCache[i] = oracleBlob.m_blobImpl;
							m_LastCachedRowNumber[i] = m_RowNumber;
						}
						((TTCLobAccessor)m_readerImpl.m_accessors[i]).m_lobLocators[m_internalRowCounter].Clear();
					}
					return oracleBlob;
				}
				return OracleBlob.Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBlob, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBlob);
				}
			}
		}

		public OracleBlob GetOracleBlobForUpdate(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBlobForUpdate);
			}
			if (OraType.ORA_OCIBLobLocator != m_readerImpl.m_accessors[i].m_internalType)
			{
				throw new InvalidCastException();
			}
			try
			{
				OracleBlob oracleBlob = null;
				byte[] oracleLobForUpdate = GetOracleLobForUpdate(i, -1);
				if (oracleLobForUpdate != null)
				{
					return new OracleBlob(m_connection, oracleLobForUpdate);
				}
				return OracleBlob.Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, (OracleTraceTag)268697600, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBlobForUpdate, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBlobForUpdate);
				}
			}
		}

		public OracleBlob GetOracleBlobForUpdate(int i, int wait)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBlobForUpdate);
			}
			if (OraType.ORA_OCIBLobLocator != m_readerImpl.m_accessors[i].m_internalType)
			{
				throw new InvalidCastException();
			}
			try
			{
				OracleBlob oracleBlob = null;
				byte[] oracleLobForUpdate = GetOracleLobForUpdate(i, wait);
				if (oracleLobForUpdate != null)
				{
					return new OracleBlob(m_connection, oracleLobForUpdate);
				}
				return OracleBlob.Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, (OracleTraceTag)268697600, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBlobForUpdate, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleBlobForUpdate);
				}
			}
		}

		public OracleClob GetOracleClob(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleClob);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (OraType.ORA_OCICLobLocator != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (-1 == m_readerImpl.m_clientInitialLOBFS && ConfigBaseClass.m_bLegacyNegativeOneILFSBehavior)
				{
					throw new InvalidCastException();
				}
				if (!m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					OracleClob oracleClob = null;
					if (!m_fillReader && m_LobImplCache != null && m_LobImplCache[i] != null && m_LastCachedRowNumber[i] == m_RowNumber)
					{
						OracleClobImpl oracleClobImpl = (OracleClobImpl)m_LobImplCache[i];
						if (oracleClobImpl.m_isTemporaryLob && !oracleClobImpl.m_doneTempLobCreate)
						{
							oracleClobImpl.CreateTemporaryLob();
							oracleClobImpl.m_doneTempLobCreate = true;
						}
						oracleClob = new OracleClob(m_connection, oracleClobImpl);
						oracleClobImpl.AddRef();
					}
					else
					{
						OracleClobImpl oracleClobImpl2 = ((!m_connection.m_isDb11gR1OrHigher || ((m_fillReader || -1 != m_readerImpl.m_clientInitialLOBFS) && (!m_fillReader || m_returnPSTypes))) ? new OracleClobImpl(m_connection.m_oracleConnectionImpl, (TTCLobAccessor)m_readerImpl.m_accessors[i], m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i) : new OracleClobImpl(m_internalRowCounter, m_connection.m_oracleConnectionImpl, (TTCLobAccessor)m_readerImpl.m_accessors[i]));
						if (oracleClobImpl2.m_isTemporaryLob && !oracleClobImpl2.IsQuasiLobLocator)
						{
							OracleClobImpl oracleClobImpl3 = (OracleClobImpl)oracleClobImpl2.m_connectionImpl.TemporaryLobReferenceGet(oracleClobImpl2.m_lobId);
							if (oracleClobImpl3 != null)
							{
								oracleClob = new OracleClob(m_connection, oracleClobImpl3);
								oracleClobImpl3.AddRef();
							}
							else
							{
								oracleClobImpl2.m_connectionImpl.TemporaryLobReferenceAdd(oracleClobImpl2.m_lobId, oracleClobImpl2);
								m_tempLobFromCurrentFetch.Add(oracleClobImpl2);
								oracleClobImpl2.AddRef();
								oracleClob = new OracleClob(m_connection, oracleClobImpl2);
							}
						}
						else
						{
							oracleClob = new OracleClob(m_connection, oracleClobImpl2);
						}
						if (!m_fillReader && m_LobImplCache != null)
						{
							m_LobImplCache[i] = oracleClob.m_clobImpl;
							m_LastCachedRowNumber[i] = m_RowNumber;
						}
						((TTCLobAccessor)m_readerImpl.m_accessors[i]).m_lobLocators[m_internalRowCounter].Clear();
					}
					return oracleClob;
				}
				return OracleClob.Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleClob, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleClob);
				}
			}
		}

		public OracleClob GetOracleClobForUpdate(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleClobForUpdate);
			}
			if (OraType.ORA_OCICLobLocator != m_readerImpl.m_accessors[i].m_internalType)
			{
				throw new InvalidCastException();
			}
			try
			{
				OracleClob oracleClob = null;
				byte[] oracleLobForUpdate = GetOracleLobForUpdate(i, -1);
				if (oracleLobForUpdate != null)
				{
					bool bNClob = ((m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i].m_characterSetForm == 2) ? true : false);
					return new OracleClob(m_connection, oracleLobForUpdate, bNClob, bCaching: false);
				}
				return OracleClob.Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, (OracleTraceTag)268697600, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleClobForUpdate, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleClobForUpdate);
				}
			}
		}

		public OracleClob GetOracleClobForUpdate(int i, int wait)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleClobForUpdate);
			}
			if (OraType.ORA_OCICLobLocator != m_readerImpl.m_accessors[i].m_internalType)
			{
				throw new InvalidCastException();
			}
			try
			{
				OracleClob oracleClob = null;
				byte[] oracleLobForUpdate = GetOracleLobForUpdate(i, wait);
				if (oracleLobForUpdate != null)
				{
					bool bNClob = ((m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i].m_characterSetForm == 2) ? true : false);
					return new OracleClob(m_connection, oracleLobForUpdate, bNClob, bCaching: false);
				}
				return OracleClob.Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, (OracleTraceTag)268697600, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleClobForUpdate, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleClobForUpdate);
				}
			}
		}

		public OracleDate GetOracleDate(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleDate);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (OraType.ORA_DATE != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					return OracleDate.Null;
				}
				byte[] dataByteRep = null;
				OracleDate oracleDate = OracleDate.Null;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag = false;
				bool flag2 = false;
				bool bCopyData = true;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is OracleDate)
					{
						return (OracleDate)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = dataByteRep.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
						bCopyData = false;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				if (dataByteRep != null)
				{
					oracleDate = new OracleDate(dataByteRep, bCopyData, dataOffset, dataLength);
				}
				if (!flag2 && flag)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, oracleDate, bCopyRawData: true);
				}
				return oracleDate;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleDate, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleDate);
				}
			}
		}

		public OracleDecimal GetOracleDecimal(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleDecimal);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (internalType != OraType.ORA_NUMBER && internalType != OraType.ORA_IBFLOAT && internalType != OraType.ORA_IBDOUBLE)
				{
					throw new InvalidCastException();
				}
				if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					return OracleDecimal.Null;
				}
				OracleDecimal oracleDecimal = OracleDecimal.Null;
				byte[] byteRep = null;
				OraColumnData oraColData = null;
				bool flag = false;
				if (!m_isRowAddedToDatatable)
				{
					flag = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is OracleDecimal)
					{
						oracleDecimal = (OracleDecimal)oraColData.m_netTypeData;
					}
					else
					{
						byteRep = oraColData.m_rawData;
						oracleDecimal = HelperClass.GetOracleDecimal(internalType, byteRep, 0);
					}
				}
				else
				{
					switch (internalType)
					{
					case OraType.ORA_IBFLOAT:
					{
						float @float = m_readerImpl.GetFloat(m_internalRowCounter, i, out byteRep);
						oracleDecimal = new OracleDecimal(@float);
						break;
					}
					case OraType.ORA_IBDOUBLE:
					{
						double @double = m_readerImpl.GetDouble(m_internalRowCounter, i, out byteRep);
						oracleDecimal = new OracleDecimal(@double);
						break;
					}
					default:
						byteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						if (byteRep != null)
						{
							oracleDecimal = new OracleDecimal(byteRep, bContainsLength: false);
						}
						break;
					}
				}
				if (!m_bUseDataSetAsDupStore && !flag && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, byteRep, oracleDecimal, bCopyRawData: true);
				}
				return oracleDecimal;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleDecimal, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleDecimal);
				}
			}
		}

		public OracleIntervalDS GetOracleIntervalDS(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleIntervalDS);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (OraType.ORA_INTERVAL_DS != m_readerImpl.m_accessors[i].m_internalType && OraType.ORA_INTERVAL_DS_DTY != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					return OracleIntervalDS.Null;
				}
				byte[] array = null;
				OracleIntervalDS oracleIntervalDS = OracleIntervalDS.Null;
				bool flag = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is OracleIntervalDS)
					{
						return (OracleIntervalDS)oraColData.m_netTypeData;
					}
					array = oraColData.m_rawData;
				}
				else
				{
					array = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
				}
				if (array != null)
				{
					int precision = m_readerImpl.m_accessors[i].m_colMetaData.m_precision;
					int scale = m_readerImpl.m_accessors[i].m_colMetaData.m_scale;
					oracleIntervalDS = new OracleIntervalDS(array, precision, scale, bCopyData: false);
				}
				if (!m_bUseDataSetAsDupStore && !flag && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, array, oracleIntervalDS, bCopyRawData: true);
				}
				return oracleIntervalDS;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleIntervalDS, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleIntervalDS);
				}
			}
		}

		public OracleIntervalYM GetOracleIntervalYM(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleIntervalYM);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (OraType.ORA_INTERVAL_YM != m_readerImpl.m_accessors[i].m_internalType && OraType.ORA_INTERVAL_YM_DTY != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					return OracleIntervalYM.Null;
				}
				byte[] array = null;
				OracleIntervalYM oracleIntervalYM = OracleIntervalYM.Null;
				bool flag = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is OracleIntervalYM)
					{
						return (OracleIntervalYM)oraColData.m_netTypeData;
					}
					array = oraColData.m_rawData;
				}
				else
				{
					array = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
				}
				if (array != null)
				{
					int precision = m_readerImpl.m_accessors[i].m_colMetaData.m_precision;
					oracleIntervalYM = new OracleIntervalYM(array, precision, bCopyData: false);
				}
				if (!m_bUseDataSetAsDupStore && !flag && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, array, oracleIntervalYM, bCopyRawData: true);
				}
				return oracleIntervalYM;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleIntervalYM, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleIntervalYM);
				}
			}
		}

		public OracleString GetOracleString(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleString);
			}
			try
			{
				if (IsDBNull(i))
				{
					return OracleString.Null;
				}
				m_bInternalCall = true;
				string @string = GetString(i);
				m_bInternalCall = false;
				return new OracleString(@string);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleString, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleString);
				}
			}
		}

		public OracleTimeStamp GetOracleTimeStamp(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleTimeStamp);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (OraType.ORA_TIMESTAMP != m_readerImpl.m_accessors[i].m_internalType && OraType.ORA_TIMESTAMP_DTY != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					return OracleTimeStamp.Null;
				}
				byte[] dataByteRep = null;
				OracleTimeStamp oracleTimeStamp = OracleTimeStamp.Null;
				int dataOffset = 0;
				int dataLength = 0;
				bool bCopyData = true;
				bool flag = false;
				bool flag2 = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag2)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is OracleTimeStamp)
					{
						return (OracleTimeStamp)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = dataByteRep.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
						if (dataByteRep != null && dataLength == 11)
						{
							bCopyData = false;
						}
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				if (dataByteRep != null)
				{
					oracleTimeStamp = new OracleTimeStamp(dataByteRep, dataOffset, dataLength, bCopyData);
				}
				if (flag && !flag2)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, oracleTimeStamp, bCopyRawData: true);
				}
				return oracleTimeStamp;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleTimeStamp, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleTimeStamp);
				}
			}
		}

		public OracleTimeStampLTZ GetOracleTimeStampLTZ(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleTimeStampLTZ);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (OraType.ORA_TIMESTAMP_LTZ != m_readerImpl.m_accessors[i].m_internalType && OraType.ORA_TIMESTAMP_LTZ_DTY != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					return OracleTimeStampLTZ.Null;
				}
				byte[] dataByteRep = null;
				OracleTimeStampLTZ oracleTimeStampLTZ = OracleTimeStampLTZ.Null;
				OraColumnData oraColData = null;
				bool flag = false;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag2 = true;
				bool flag3 = false;
				if (!m_isRowAddedToDatatable)
				{
					flag3 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag3)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is OracleTimeStampLTZ)
					{
						return (OracleTimeStampLTZ)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = dataByteRep.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
						if (dataByteRep != null && dataLength == 11)
						{
							flag2 = false;
						}
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				DateTime? dateObj = null;
				if (dataByteRep != null)
				{
					byte[] byteRep = null;
					OracleTimeZoneInfo? dBTimeZoneBytes = m_connection.m_oracleConnectionImpl.GetDBTimeZoneBytes();
					if (flag2)
					{
						byte[] array = new byte[11];
						Array.Copy(dataByteRep, dataOffset, array, 0, dataLength);
						TimeStamp.ConvertDBTimeToLTZData(array, dBTimeZoneBytes, m_readerImpl.m_sessionTimeZone, out byteRep, out dateObj);
					}
					else
					{
						TimeStamp.ConvertDBTimeToLTZData(dataByteRep, dBTimeZoneBytes, m_readerImpl.m_sessionTimeZone, out byteRep, out dateObj);
					}
					oracleTimeStampLTZ = new OracleTimeStampLTZ(byteRep, bCopyData: false);
				}
				if (flag && !flag3)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, oracleTimeStampLTZ, bCopyRawData: true);
				}
				return oracleTimeStampLTZ;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleTimeStampLTZ, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleTimeStampLTZ);
				}
			}
		}

		public OracleTimeStampTZ GetOracleTimeStampTZ(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleTimeStampTZ);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (OraType.ORA_TIMESTAMP_TZ != m_readerImpl.m_accessors[i].m_internalType && OraType.ORA_TIMESTAMP_TZ_DTY != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					return OracleTimeStampTZ.Null;
				}
				OracleTimeStampTZ oracleTimeStampTZ = OracleTimeStampTZ.Null;
				byte[] dataByteRep = null;
				int dataOffset = 0;
				int dataLength = 0;
				bool flag = true;
				bool flag2 = false;
				bool flag3 = false;
				OraColumnData oraColData = null;
				if (!m_isRowAddedToDatatable)
				{
					flag3 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData);
				}
				if (flag3)
				{
					if (oraColData.m_netTypeData != null && oraColData.m_netTypeData is OracleTimeStampTZ)
					{
						return (OracleTimeStampTZ)oraColData.m_netTypeData;
					}
					dataByteRep = oraColData.m_rawData;
					dataLength = dataByteRep.Length;
				}
				else
				{
					if (!m_bUseDataSetAsDupStore && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						flag2 = m_readerImpl.m_dataUnmarshaller.NextRowHasDuplicateData(m_internalRowCounter, i);
					}
					if (flag2)
					{
						dataByteRep = m_readerImpl.m_accessors[i].GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
						dataLength = dataByteRep.Length;
						flag = false;
					}
					else
					{
						m_readerImpl.m_accessors[i].GetInternalDataRef(m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, ref dataByteRep, ref dataOffset, ref dataLength);
					}
				}
				if (dataByteRep != null)
				{
					if (!m_connection.m_oracleConnectionImpl.IsTZDataSentAsLocalTime)
					{
						oracleTimeStampTZ = new OracleTimeStampTZ(dataByteRep, flag, dataOffset, dataLength);
					}
					else
					{
						byte[] utcArray = null;
						DateTime? dateObj = null;
						if (flag)
						{
							byte[] array = new byte[13];
							Array.Copy(dataByteRep, dataOffset, array, 0, dataLength);
							TimeStamp.GetUTCByteRepFromLocalArray(array, out utcArray, out dateObj);
						}
						else
						{
							TimeStamp.GetUTCByteRepFromLocalArray(dataByteRep, out utcArray, out dateObj);
						}
						oracleTimeStampTZ = new OracleTimeStampTZ(utcArray, bCopyData: false, 0, dataLength);
					}
				}
				if (flag2 && !flag3)
				{
					m_readerImpl.m_dataUnmarshaller.SaveColumnData(m_internalRowCounter, i, dataByteRep, oracleTimeStampTZ, bCopyRawData: true);
				}
				return oracleTimeStampTZ;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleTimeStampTZ, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleTimeStampTZ);
				}
			}
		}

		public OracleXmlType GetOracleXmlType(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleXmlType);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (OraType.ORA_INTY != m_readerImpl.m_accessors[i].m_internalType)
				{
					throw new InvalidCastException();
				}
				if (!m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
				{
					OraXmlTypeHeader xmlTypeHeader = new OraXmlTypeHeader();
					OraXmlTypeData xmlTypeData = null;
					((TTCXmlTypeAccessor)m_readerImpl.m_accessors[i]).UnpickleXmlType(m_connection.m_oracleConnectionImpl, m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i, xmlTypeHeader, out xmlTypeData);
					if (xmlTypeData != null)
					{
						OracleXmlTypeImpl xmlTypeImpl = new OracleXmlTypeImpl(m_connection.m_oracleConnectionImpl, xmlTypeHeader, xmlTypeData);
						return new OracleXmlType(m_connection, xmlTypeImpl);
					}
					return OracleXmlType.Null;
				}
				return OracleXmlType.Null;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleXmlType, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleXmlType);
				}
			}
		}

		public object GetOracleValue(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleValue);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				object oraColData = null;
				OraType internalType = m_readerImpl.m_accessors[i].m_internalType;
				if (m_bUseDataSetAsDupStore)
				{
					if (m_currentDataTableForFill == null)
					{
						m_currentDataTableIndex++;
						if (m_dataTablesReferenceForFill is DataTable)
						{
							m_currentDataTableForFill = (DataTable)m_dataTablesReferenceForFill;
						}
						else if (m_dataTablesReferenceForFill is DataTable[])
						{
							m_currentDataTableForFill = ((DataTable[])m_dataTablesReferenceForFill)[m_currentDataTableIndex];
						}
						else
						{
							m_currentDataTableForFill = ((DataTableCollection)m_dataTablesReferenceForFill)[((DataTableCollection)m_dataTablesReferenceForFill).Count - 1];
						}
						if (m_currentDataTableForFill != null)
						{
							m_initialRowCnt = m_currentDataTableForFill.Rows.Count;
							m_isRowAddedToDatatable = false;
						}
					}
					bool flag = false;
					if (m_isRowAddedToDatatable)
					{
						flag = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicateInDataSet(m_internalRowCounter, i, m_currentDataTableForFill, m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i].pColAlias, out oraColData);
					}
					if (flag)
					{
						return oraColData;
					}
				}
				switch (internalType)
				{
				case OraType.ORA_RAW:
				case OraType.ORA_LONGRAW:
					oraColData = GetOracleBinary(i);
					break;
				case OraType.ORA_OCIBFileLocator:
					oraColData = GetOracleBFile(i);
					break;
				case OraType.ORA_OCIBLobLocator:
					oraColData = ((-1 != m_readerImpl.m_clientInitialLOBFS || !ConfigBaseClass.m_bLegacyNegativeOneILFSBehavior) ? GetOracleBlob(i) : ((object)GetOracleBinary(i)));
					break;
				case OraType.ORA_OCICLobLocator:
					oraColData = ((-1 != m_readerImpl.m_clientInitialLOBFS || !ConfigBaseClass.m_bLegacyNegativeOneILFSBehavior) ? GetOracleClob(i) : ((object)GetOracleString(i)));
					break;
				case OraType.ORA_DATE:
					oraColData = GetOracleDate(i);
					break;
				case OraType.ORA_NUMBER:
					oraColData = GetOracleDecimal(i);
					break;
				case OraType.ORA_CHARN:
				case OraType.ORA_LONG:
				case OraType.ORA_ROWID:
				case OraType.ORA_CHAR:
				case OraType.ORA_OCIJSON:
				case OraType.ORA_UROWID:
					oraColData = GetOracleString(i);
					break;
				case OraType.ORA_INTERVAL_DS_DTY:
				case OraType.ORA_INTERVAL_DS:
					oraColData = GetOracleIntervalDS(i);
					break;
				case OraType.ORA_INTERVAL_YM_DTY:
				case OraType.ORA_INTERVAL_YM:
					oraColData = GetOracleIntervalYM(i);
					break;
				case OraType.ORA_TIMESTAMP_DTY:
				case OraType.ORA_TIMESTAMP:
					oraColData = GetOracleTimeStamp(i);
					break;
				case OraType.ORA_TIMESTAMP_LTZ_DTY:
				case OraType.ORA_TIMESTAMP_LTZ:
					oraColData = GetOracleTimeStampLTZ(i);
					break;
				case OraType.ORA_TIMESTAMP_TZ_DTY:
				case OraType.ORA_TIMESTAMP_TZ:
					oraColData = GetOracleTimeStampTZ(i);
					break;
				case OraType.ORA_INTY:
					oraColData = GetOracleXmlType(i);
					break;
				case OraType.ORA_IBFLOAT:
				case OraType.ORA_IBDOUBLE:
					oraColData = GetOracleDecimal(i);
					break;
				}
				return oraColData;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleValue, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleValue);
				}
			}
		}

		public int GetOracleValues(object[] values)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleValues);
			}
			try
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				int num = values.Length;
				int num2 = 0;
				num2 = ((num >= m_fieldCount) ? m_fieldCount : num);
				for (int i = 0; i < num2; i++)
				{
					values[i] = GetOracleValue(i);
				}
				return num2;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleValues, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleValues);
				}
			}
		}

		public override int GetOrdinal(string name)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOrdinal);
			}
			try
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				return m_readerImpl.GetColumnOrdinal(name);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOrdinal, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOrdinal);
				}
			}
		}

		public override Type GetProviderSpecificFieldType(int ordinal)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetProviderSpecificFieldType);
			}
			try
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (ordinal >= m_fieldCount || ordinal < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				Type result = null;
				switch (GetOraDbType(ordinal))
				{
				case OracleDbType.BFile:
					result = ODPType.OraBFile;
					break;
				case OracleDbType.Blob:
					result = ODPType.OraBlob;
					break;
				case OracleDbType.Char:
				case OracleDbType.Long:
				case OracleDbType.NChar:
				case OracleDbType.NVarchar2:
				case OracleDbType.Varchar2:
				case OracleDbType.Json:
					result = ODPType.OraString;
					break;
				case OracleDbType.Clob:
				case OracleDbType.NClob:
					result = ODPType.OraClob;
					break;
				case OracleDbType.Date:
					result = ODPType.OraDate;
					break;
				case OracleDbType.Byte:
				case OracleDbType.Decimal:
				case OracleDbType.Double:
				case OracleDbType.Int16:
				case OracleDbType.Int32:
				case OracleDbType.Int64:
				case OracleDbType.Single:
				case OracleDbType.BinaryDouble:
				case OracleDbType.BinaryFloat:
					result = ODPType.OraDecimal;
					break;
				case OracleDbType.LongRaw:
				case OracleDbType.Raw:
					result = ODPType.OraBinary;
					break;
				case OracleDbType.IntervalDS:
					result = ODPType.OraIntervalDS;
					break;
				case OracleDbType.IntervalYM:
					result = ODPType.OraIntervalYM;
					break;
				case OracleDbType.RefCursor:
					result = ODPType.OraRefCursor;
					break;
				case OracleDbType.TimeStamp:
					result = ODPType.OraTimeStamp;
					break;
				case OracleDbType.TimeStampTZ:
					result = ODPType.OraTimeStampTZ;
					break;
				case OracleDbType.TimeStampLTZ:
					result = ODPType.OraTimeStampLTZ;
					break;
				case OracleDbType.XmlType:
					result = ODPType.OraXmlType;
					break;
				}
				return result;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetProviderSpecificFieldType, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetProviderSpecificFieldType);
				}
			}
		}

		public override object GetProviderSpecificValue(int ordinal)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetProviderSpecificValue);
			}
			try
			{
				return GetOracleValue(ordinal);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetProviderSpecificValue, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetProviderSpecificValue);
				}
			}
		}

		public override int GetProviderSpecificValues(object[] values)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetProviderSpecificValues);
			}
			try
			{
				return GetOracleValues(values);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetProviderSpecificValues, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetProviderSpecificValues);
				}
			}
		}

		public override DataTable GetSchemaTable()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetSchemaTable);
			}
			try
			{
				return GetSchemaTableCopy(ref m_dataTable, isFromEx: false);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetSchemaTable, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetSchemaTable);
				}
			}
		}

		internal DataTable GetSchemaTableEx()
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetSchemaTableEx);
			}
			try
			{
				return GetSchemaTableCopy(ref m_dataTableEx, isFromEx: true);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetSchemaTableEx, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetSchemaTableEx);
				}
			}
		}

		private DataTable GetSchemaTableCopy(ref DataTable dataTable, bool isFromEx)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetSchemaTableCopy);
			}
			try
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (m_readerImpl == null || m_readerImpl.m_sqlMetaData == null)
				{
					return null;
				}
				if (m_noMoreResults)
				{
					return null;
				}
				DataTable dataTable2 = null;
				if (dataTable == null)
				{
					PopulateMetaData();
					RetrieveSchemaTable(ref dataTable, isFromEx);
					if (!isFromEx && m_sqlStatementType != 0)
					{
						if (m_refCursor != null)
						{
							RefCursorInfo refCursorInfo = m_refCursor.m_refCursorInfo;
							if (refCursorInfo != null && refCursorInfo.columnInfo.Rows.Count > 0)
							{
								dataTable2 = refCursorInfo.columnInfo;
							}
						}
						else
						{
							ConfigBaseClass.StoredProcedureInfo storedProcInfo = ConfigBaseClass.GetInstance(bIsManaged: true).GetStoredProcInfo(m_storedProcName);
							if (storedProcInfo != null)
							{
								if (m_numExplicitBoundRefCursors != 0 && storedProcInfo.m_numExplicitBoundRefCursors != m_numExplicitBoundRefCursors)
								{
									storedProcInfo.m_numExplicitBoundRefCursors = m_numExplicitBoundRefCursors;
								}
								dataTable2 = storedProcInfo.GetColumnInfo(m_readerImpl.m_currentRefCursorIndex);
							}
						}
						if (dataTable2 != null)
						{
							DataTable dataTable3 = dataTable2.Copy();
							dataTable3.Columns.Remove("NativeDataType");
							dataTable3.Columns.Remove("ProviderDBType");
							dataTable3.Columns.Remove("ObjectName");
							int num = 0;
							int count = dataTable3.Rows.Count;
							foreach (DataRow row in dataTable.Rows)
							{
								if (num < count)
								{
									new RefCursorInfo().FillMissingValuesFromMetadata(row, dataTable3.Rows[num++]);
									continue;
								}
								break;
							}
							dataTable3.AcceptChanges();
							return dataTable3;
						}
					}
				}
				return dataTable.Copy();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetSchemaTableCopy, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetSchemaTableCopy);
				}
			}
		}

		private void RetrieveSchemaTable(ref DataTable dataTable, bool isFromEx)
		{
			dataTable = new DataTable("SchemaTable");
			dataTable.MinimumCapacity = m_fieldCount;
			dataTable.Columns.Add("ColumnName", typeof(string));
			dataTable.Columns.Add("ColumnOrdinal", typeof(int));
			dataTable.Columns.Add("ColumnSize", typeof(int));
			dataTable.Columns.Add("NumericPrecision", typeof(short));
			dataTable.Columns.Add("NumericScale", typeof(short));
			dataTable.Columns.Add("IsUnique", typeof(bool));
			dataTable.Columns.Add("IsKey", typeof(bool));
			dataTable.Columns.Add("IsRowID", typeof(bool));
			dataTable.Columns.Add("BaseColumnName", typeof(string));
			dataTable.Columns.Add("BaseSchemaName", typeof(string));
			dataTable.Columns.Add("BaseTableName", typeof(string));
			dataTable.Columns.Add("DataType", typeof(Type));
			dataTable.Columns.Add("ProviderType", typeof(OracleDbType));
			dataTable.Columns.Add("AllowDBNull", typeof(bool));
			dataTable.Columns.Add("IsAliased", typeof(bool));
			dataTable.Columns.Add("IsByteSemantic", typeof(bool));
			dataTable.Columns.Add("IsExpression", typeof(bool));
			dataTable.Columns.Add("IsHidden", typeof(bool));
			dataTable.Columns.Add("IsReadOnly", typeof(bool));
			dataTable.Columns.Add("IsLong", typeof(bool));
			dataTable.Columns.Add("UdtTypeName", typeof(string));
			dataTable.Columns.Add("IsAutoIncrement", typeof(bool));
			dataTable.Columns.Add("IsIdentity", typeof(bool));
			dataTable.Columns.Add("IdentityType", typeof(OracleIdentityType));
			dataTable.Columns.Add("IsValueLob", typeof(bool));
			if (isFromEx)
			{
				dataTable.Columns.Add("NativeDataType", typeof(string));
			}
			int columnIndex = dataTable.Columns.Count - 1;
			ColumnLocalParsePrimaryKeyInfo columnLocalParsePrimaryKeyInfo = ColumnLocalParsePrimaryKeyInfo.Null;
			bool flag = m_readerImpl.m_sqlMetaData.m_sqlMetaInfo != null && m_readerImpl.m_sqlMetaData.m_sqlMetaInfo.m_columnMetaInfo != null;
			bool flag2 = m_readerImpl.m_numberOfHiddenColumns > 0;
			for (int i = 0; i < m_fieldCount; i++)
			{
				ColumnDescribeInfo columnDescribeInfo = m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i];
				if (flag)
				{
					columnLocalParsePrimaryKeyInfo = m_readerImpl.m_sqlMetaData.m_sqlMetaInfo.m_columnMetaInfo[i];
				}
				DataRow dataRow = dataTable.NewRow();
				dataRow[0] = columnDescribeInfo.pColAlias;
				dataRow[7] = false;
				dataRow[19] = false;
				dataRow[24] = false;
				dataRow[1] = i;
				dataRow[8] = columnLocalParsePrimaryKeyInfo.m_columnName;
				dataRow[9] = columnLocalParsePrimaryKeyInfo.m_schemaName;
				dataRow[10] = columnLocalParsePrimaryKeyInfo.pTabName;
				dataRow[13] = columnDescribeInfo.m_isNullAllowed;
				OraType dataType = (OraType)columnDescribeInfo.m_dataType;
				switch (dataType)
				{
				case OraType.ORA_NUMBER:
					dataRow[2] = 22;
					break;
				case OraType.ORA_INTERVAL_YM_DTY:
				case OraType.ORA_INTERVAL_YM:
					dataRow[2] = 5;
					break;
				case OraType.ORA_DATE:
					dataRow[2] = 7;
					break;
				case OraType.ORA_ROWID:
				case OraType.ORA_UROWID:
					dataRow[2] = 18;
					dataRow[7] = true;
					if (!m_connection.m_isDb10gR2OrHigher && flag2 && columnLocalParsePrimaryKeyInfo.m_columnName == "ROWID")
					{
						dataRow[13] = false;
					}
					break;
				case OraType.ORA_TIMESTAMP_DTY:
				case OraType.ORA_INTERVAL_DS_DTY:
				case OraType.ORA_TIMESTAMP:
				case OraType.ORA_INTERVAL_DS:
				case OraType.ORA_TIMESTAMP_LTZ_DTY:
				case OraType.ORA_TIMESTAMP_LTZ:
					dataRow[2] = 11;
					break;
				case OraType.ORA_TIMESTAMP_TZ_DTY:
				case OraType.ORA_TIMESTAMP_TZ:
					dataRow[2] = 13;
					break;
				case OraType.ORA_OCICLobLocator:
				case OraType.ORA_OCIBLobLocator:
					dataRow[2] = int.MaxValue;
					dataRow[19] = true;
					dataRow[24] = columnDescribeInfo.m_bIsValueLob;
					break;
				case OraType.ORA_LONG:
				case OraType.ORA_LONGRAW:
				case OraType.ORA_OCIBFileLocator:
					dataRow[2] = int.MaxValue;
					dataRow[19] = true;
					break;
				case OraType.ORA_OCIJSON:
					dataRow[2] = 33554432;
					dataRow[19] = true;
					break;
				case OraType.ORA_INTY:
					dataRow[2] = int.MaxValue;
					break;
				case OraType.ORA_CHARN:
				case OraType.ORA_VARCHAR:
				case OraType.ORA_CHAR:
					if ((columnDescribeInfo.m_contFlag & 0x1000) != 4096)
					{
						dataRow[15] = true;
						dataRow[2] = columnDescribeInfo.m_maxLength;
						break;
					}
					dataRow[2] = columnDescribeInfo.m_maxLengthOfChars;
					if (columnDescribeInfo.m_characterSetForm != 2)
					{
						dataRow[15] = false;
					}
					break;
				default:
					dataRow[2] = columnDescribeInfo.m_maxLength;
					break;
				}
				if (dataType == OraType.ORA_NUMBER || dataType == OraType.ORA_INTERVAL_DS || dataType == OraType.ORA_INTERVAL_DS_DTY || dataType == OraType.ORA_INTERVAL_YM || dataType == OraType.ORA_INTERVAL_YM_DTY)
				{
					dataRow[3] = columnDescribeInfo.m_precision;
				}
				if (dataType == OraType.ORA_NUMBER || dataType == OraType.ORA_INTERVAL_DS || dataType == OraType.ORA_INTERVAL_DS_DTY || dataType == OraType.ORA_TIMESTAMP || dataType == OraType.ORA_TIMESTAMP_DTY || dataType == OraType.ORA_TIMESTAMP_LTZ || dataType == OraType.ORA_TIMESTAMP_LTZ_DTY || dataType == OraType.ORA_TIMESTAMP_TZ || dataType == OraType.ORA_TIMESTAMP_TZ_DTY)
				{
					dataRow[4] = columnDescribeInfo.m_scale;
				}
				if ((m_commandBehavior & CommandBehavior.KeyInfo) == CommandBehavior.KeyInfo)
				{
					dataRow[5] = columnLocalParsePrimaryKeyInfo.bIsUnique;
					dataRow[6] = columnLocalParsePrimaryKeyInfo.bIsKeyColumn;
				}
				if (m_returnPSTypes)
				{
					dataRow[11] = GetProviderSpecificFieldType(i);
				}
				else
				{
					dataRow[11] = GetFieldType(i);
				}
				if (IsCorruptible(dataType) && (Type)dataRow[11] == typeof(string))
				{
					dataRow[2] = -1;
				}
				OracleDbType oraDbType = GetOraDbType(i);
				dataRow[12] = oraDbType;
				if (m_sqlStatementType != SqlStatementType.PLSQL)
				{
					dataRow[14] = columnLocalParsePrimaryKeyInfo.m_columnName != columnDescribeInfo.pColAlias;
					dataRow[16] = columnLocalParsePrimaryKeyInfo.bIsExpression;
				}
				dataRow[17] = (flag2 && columnLocalParsePrimaryKeyInfo.m_columnName == "ROWID") || columnLocalParsePrimaryKeyInfo.bIsHidden;
				if (columnLocalParsePrimaryKeyInfo.Updatable || (m_sqlStatementType == SqlStatementType.PLSQL && !(bool)dataRow[7]))
				{
					dataRow[18] = false;
				}
				else
				{
					dataRow[18] = true;
				}
				if (columnDescribeInfo.m_bIsIdentityCol)
				{
					dataRow[21] = true;
					dataRow[22] = true;
					if (columnDescribeInfo.m_bIsGenAlways)
					{
						dataRow[23] = OracleIdentityType.GeneratedAlways;
					}
					else if (columnDescribeInfo.m_bIsGenByDefaultOnNull)
					{
						dataRow[23] = OracleIdentityType.GeneratedByDefaultOnNull;
						dataRow[13] = true;
					}
					else
					{
						dataRow[23] = OracleIdentityType.GeneratedByDefault;
					}
				}
				else
				{
					dataRow[21] = false;
					dataRow[22] = false;
				}
				if (isFromEx)
				{
					try
					{
						switch (dataType)
						{
						case OraType.ORA_ROWID:
							dataRow[columnIndex] = "ROWID";
							break;
						case OraType.ORA_UROWID:
							dataRow[columnIndex] = "UROWID";
							break;
						default:
						{
							int num = (int)(oraDbType - 101);
							dataRow[columnIndex] = OracleTypeMapper.m_OraDbToOraNative[num];
							break;
						}
						}
					}
					catch
					{
						dataRow[columnIndex] = string.Empty;
					}
				}
				dataTable.Rows.Add(dataRow);
			}
			dataTable.AcceptChanges();
		}

		private void PopulateMetaData(bool tryGetPKInfo = true)
		{
			if (m_sqlStatementType == SqlStatementType.SELECT)
			{
				if (!m_readerImpl.m_sqlMetaData.bStmtParsed && m_readerImpl.m_sqlMetaData.m_noOfColumns > 0)
				{
					SQLParser.GetSchemaMetaData(m_readerImpl.m_sqlMetaData, m_connection, m_connection.m_oracleConnectionImpl, m_readerImpl.m_numberOfHiddenColumns > 0);
				}
				if ((m_commandBehavior & CommandBehavior.KeyInfo) == CommandBehavior.KeyInfo && !m_readerImpl.m_sqlMetaData.bPkFetched && tryGetPKInfo)
				{
					SQLMetaData.GetPrimaryKey(m_connection, m_readerImpl.m_sqlMetaData, m_readerImpl.m_numberOfHiddenColumns, bSchemaTable: true);
				}
			}
		}

		public override object GetValue(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetValue);
			}
			try
			{
				if (!m_bInternalCall && IsDBNull(i))
				{
					return DBNull.Value;
				}
				int internalRowCounter = m_internalRowCounter;
				ColumnDescribeInfo columnDescribeInfo = m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i];
				OraType dataType = (OraType)columnDescribeInfo.m_dataType;
				Accessor accessor = m_readerImpl.m_accessors[i];
				object oraColData = null;
				m_bInternalCall = true;
				try
				{
					if (m_bUseDataSetAsDupStore)
					{
						if (m_currentDataTableForFill == null)
						{
							m_currentDataTableIndex++;
							if (m_dataTablesReferenceForFill is DataTable)
							{
								m_currentDataTableForFill = (DataTable)m_dataTablesReferenceForFill;
							}
							else if (m_dataTablesReferenceForFill is DataTable[])
							{
								m_currentDataTableForFill = ((DataTable[])m_dataTablesReferenceForFill)[m_currentDataTableIndex];
							}
							else
							{
								m_currentDataTableForFill = ((DataTableCollection)m_dataTablesReferenceForFill)[((DataTableCollection)m_dataTablesReferenceForFill).Count - 1];
							}
							if (m_currentDataTableForFill != null)
							{
								m_initialRowCnt = m_currentDataTableForFill.Rows.Count;
								m_isRowAddedToDatatable = false;
							}
						}
						bool flag = false;
						if (m_isRowAddedToDatatable)
						{
							flag = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicateInDataSet(m_internalRowCounter, i, m_currentDataTableForFill, columnDescribeInfo.pColAlias, out oraColData);
						}
						if (flag)
						{
							return oraColData;
						}
					}
					switch (dataType)
					{
					case OraType.ORA_CHARN:
					case OraType.ORA_ROWID:
					case OraType.ORA_CHAR:
					case OraType.ORA_OCIJSON:
					case OraType.ORA_UROWID:
						oraColData = GetString(i);
						break;
					case OraType.ORA_NUMBER:
					{
						int scale = columnDescribeInfo.m_scale;
						int precision = columnDescribeInfo.m_precision;
						oraColData = ((scale <= 0 && precision - scale < 5) ? ((object)GetInt16(i)) : ((scale <= 0 && precision - scale < 10) ? ((object)GetInt32(i)) : ((scale <= 0 && precision - scale < 19) ? ((object)GetInt64(i)) : ((precision < 8 && ((scale <= 0 && precision - scale <= 38) || (scale > 0 && scale <= 44))) ? ((object)GetFloat(i)) : ((precision >= 16) ? ((object)GetDecimal(i)) : ((object)GetDouble(i)))))));
						break;
					}
					case OraType.ORA_DATE:
					case OraType.ORA_TIMESTAMP_DTY:
					case OraType.ORA_TIMESTAMP_TZ_DTY:
					case OraType.ORA_TIMESTAMP:
					case OraType.ORA_TIMESTAMP_TZ:
					case OraType.ORA_TIMESTAMP_LTZ_DTY:
					case OraType.ORA_TIMESTAMP_LTZ:
					{
						if (!m_isFromEF || m_expectedColumnTypes == null || !(m_expectedColumnTypes[i] == typeof(DateTimeOffset)))
						{
							oraColData = ((!m_isFromEFCore || (dataType != OraType.ORA_TIMESTAMP_TZ && dataType != OraType.ORA_TIMESTAMP_TZ_DTY)) ? ((object)GetDateTime(i)) : ((object)GetDateTimeOffset(i)));
							break;
						}
						OracleTimeStampTZ oracleTimeStampTZ;
						switch (dataType)
						{
						case OraType.ORA_TIMESTAMP_TZ_DTY:
						case OraType.ORA_TIMESTAMP_TZ:
							oracleTimeStampTZ = GetOracleTimeStampTZ(i);
							break;
						case OraType.ORA_TIMESTAMP_LTZ_DTY:
						case OraType.ORA_TIMESTAMP_LTZ:
							oracleTimeStampTZ = GetOracleTimeStampLTZ(i).ToOracleTimeStampTZ();
							break;
						case OraType.ORA_TIMESTAMP_DTY:
						case OraType.ORA_TIMESTAMP:
							oracleTimeStampTZ = GetOracleTimeStamp(i).ToOracleTimeStampTZ();
							break;
						default:
							oracleTimeStampTZ = GetOracleDate(i).ToOracleTimeStamp().ToOracleTimeStampTZ();
							break;
						}
						oraColData = new DateTimeOffset(oracleTimeStampTZ.Value, oracleTimeStampTZ.GetTimeZoneOffset());
						break;
					}
					case OraType.ORA_RAW:
					{
						OraColumnData oraColData2 = null;
						bool flag2 = false;
						if (!m_isRowAddedToDatatable)
						{
							flag2 = m_readerImpl.m_dataUnmarshaller.TryGetValueIfDuplicate(m_internalRowCounter, i, out oraColData2);
						}
						if (flag2)
						{
							if (oraColData2.m_rawData != null)
							{
								byte[] array = new byte[oraColData2.m_rawData.Length];
								Buffer.BlockCopy(oraColData2.m_rawData, 0, array, 0, oraColData2.m_rawData.Length);
								oraColData = array;
							}
							else if (oraColData2.m_netTypeData is OracleBinary)
							{
								oraColData = ((OracleBinary)oraColData2.m_netTypeData).Value;
							}
						}
						else
						{
							oraColData = accessor.GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, internalRowCounter, i);
						}
						break;
					}
					case OraType.ORA_IBDOUBLE:
						oraColData = GetDouble(i);
						break;
					case OraType.ORA_IBFLOAT:
						oraColData = GetFloat(i);
						break;
					case OraType.ORA_LONG:
						oraColData = GetString(i);
						break;
					case OraType.ORA_INTERVAL_DS_DTY:
					case OraType.ORA_INTERVAL_DS:
						oraColData = GetTimeSpan(i);
						break;
					case OraType.ORA_INTERVAL_YM_DTY:
					case OraType.ORA_INTERVAL_YM:
						oraColData = GetInt64(i);
						break;
					case OraType.ORA_LONGRAW:
					{
						if (m_readerImpl.IsCompleteDataForLongAvailable(m_internalRowCounter, i))
						{
							oraColData = ((TTCLongAccessor)accessor).GetByteRepresentation(m_readerImpl.m_dataUnmarshaller, internalRowCounter, i);
							break;
						}
						byte[] buffer = null;
						GetLongRawData(m_connection, m_internalRowCounter, i, 0L, ref buffer, 0, -1, bAllocateBuffer: true);
						oraColData = buffer;
						break;
					}
					case OraType.ORA_OCICLobLocator:
					{
						string empty = string.Empty;
						byte[] lobLocator3 = null;
						object obj2 = m_LobImplCache[i];
						if (!m_fillReader && m_LobImplCache != null && obj2 != null && m_LastCachedRowNumber[i] == m_RowNumber)
						{
							lobLocator3 = ((OracleClobImpl)obj2).m_lobLocator;
						}
						if (m_connection.m_isDb11gR1OrHigher && ((!m_fillReader && -1 == m_readerImpl.m_clientInitialLOBFS) || (m_fillReader && !m_returnPSTypes)))
						{
							return OracleClobImpl.GetCompleteClobData(internalRowCounter, m_readerImpl.m_dataUnmarshaller, m_connection.m_oracleConnectionImpl, lobLocator3, (TTCLobAccessor)accessor);
						}
						return OracleClobImpl.GetCompleteClobData(internalRowCounter, i, m_connection.m_oracleConnectionImpl, lobLocator3, m_readerImpl.m_dataUnmarshaller, (TTCLobAccessor)accessor, ref m_tempOraClobImpl);
					}
					case OraType.ORA_OCIBLobLocator:
					{
						if (m_connection.m_isDb11gR1OrHigher && ((!m_fillReader && -1 == m_readerImpl.m_clientInitialLOBFS) || (m_fillReader && !m_returnPSTypes)))
						{
							return OracleBlobImpl.GetCompleteBlobData(internalRowCounter, (TTCLobAccessor)accessor);
						}
						byte[] lobLocator2 = null;
						object obj = m_LobImplCache[i];
						if (!m_fillReader && m_LobImplCache != null && obj != null && m_LastCachedRowNumber[i] == m_RowNumber)
						{
							lobLocator2 = ((OracleBlobImpl)obj).m_lobLocator;
						}
						return OracleBlobImpl.GetCompleteBlobData(internalRowCounter, i, m_connection.m_oracleConnectionImpl, lobLocator2, m_readerImpl.m_dataUnmarshaller, (TTCLobAccessor)accessor, ref m_tempOraBlobImpl);
					}
					case OraType.ORA_OCIBFileLocator:
					{
						byte[] lobLocator = m_readerImpl.GetLobLocator(internalRowCounter, i);
						if (lobLocator != null)
						{
							OracleBFileImpl oracleBFileImpl = new OracleBFileImpl(m_connection.m_oracleConnectionImpl, lobLocator);
							oracleBFileImpl.OpenFile();
							byte[] outBuffer;
							try
							{
								long length = oracleBFileImpl.GetLength();
								outBuffer = new byte[length];
								oracleBFileImpl.Read(1L, length, 0L, ref outBuffer);
							}
							finally
							{
								oracleBFileImpl.CloseFile();
							}
							return outBuffer;
						}
						return DBNull.Value;
					}
					case OraType.ORA_INTY:
					{
						OracleXmlTypeImpl oracleXmlTypeImpl = new OracleXmlTypeImpl(m_connection.m_oracleConnectionImpl, (TTCXmlTypeAccessor)m_readerImpl.m_accessors[i], m_readerImpl.m_dataUnmarshaller, internalRowCounter, i);
						oracleXmlTypeImpl.Initialize(m_connection);
						return oracleXmlTypeImpl.GetString();
					}
					default:
						throw new Exception("Unsupported Data Type");
					}
				}
				finally
				{
					m_bInternalCall = false;
				}
				if (m_isFromEF && m_expectedColumnTypes != null && oraColData.GetType() != m_expectedColumnTypes[i])
				{
					oraColData = ChangeType(oraColData, m_expectedColumnTypes[i]);
				}
				return oraColData;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetValue, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetValue);
				}
			}
		}

		public override int GetValues(object[] values)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetValues);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				int num = values.Length;
				int num2 = FieldCount;
				if (num < num2)
				{
					num2 = num;
				}
				for (int i = 0; i < num2; i++)
				{
					values[i] = GetValue(i);
				}
				return num2;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetValues, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetValues);
				}
			}
		}

		public XmlReader GetXmlReader(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetXmlReader);
			}
			if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
			{
				throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
			}
			if (i >= m_fieldCount || i < 0)
			{
				throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
			}
			if (m_internalRowCounter < 0)
			{
				throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
			}
			if (OraType.ORA_INTY != m_readerImpl.m_accessors[i].m_internalType)
			{
				throw new InvalidCastException();
			}
			if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i))
			{
				throw new InvalidCastException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NULL_COL_DATA));
			}
			OracleXmlTypeImpl oracleXmlTypeImpl = new OracleXmlTypeImpl(m_connection.m_oracleConnectionImpl, (TTCXmlTypeAccessor)m_readerImpl.m_accessors[i], m_readerImpl.m_dataUnmarshaller, m_internalRowCounter, i);
			oracleXmlTypeImpl.Initialize(m_connection);
			return oracleXmlTypeImpl.GetXmlReader(null);
		}

		public override bool IsDBNull(int i)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.IsDBNull);
			}
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				return m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, m_internalRowCounter, i);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.IsDBNull, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.IsDBNull);
				}
			}
		}

		public override bool NextResult()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.NextResult);
			}
			bool flag = false;
			try
			{
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				m_bDoneReadOne = false;
				m_bHasRows = false;
				if (m_readerImpl == null)
				{
					return false;
				}
				if ((m_commandBehavior & CommandBehavior.SingleResult) != CommandBehavior.SingleResult)
				{
					if (m_readerImpl.ConfigureNextResult())
					{
						flag = true;
						m_internalRowCounter = -1;
						m_RowNumber = 0;
						m_LobImplCache = null;
						m_LastCachedRowNumber = null;
						m_bBeginingOfFile = true;
						m_bEndOfFile = false;
						if (m_dataTable != null)
						{
							m_dataTable.Dispose();
							m_dataTable = null;
						}
						if (m_dataTableEx != null)
						{
							m_dataTableEx.Dispose();
							m_dataTableEx = null;
						}
						if (m_readerImpl.m_sqlMetaData != null)
						{
							m_maxRowSize = m_readerImpl.m_sqlMetaData.m_maxRowSize + m_readerImpl.m_sqlMetaData.m_numOfLOBColumns * Math.Max(86, 86 + (int)m_readerImpl.m_clientInitialLOBFS) + m_readerImpl.m_sqlMetaData.m_numOfJSONColumns * Math.Max(86, 86) + m_readerImpl.m_sqlMetaData.m_numOfLONGColumns * Math.Max(2, m_initialLongFetchSize) + m_readerImpl.m_sqlMetaData.m_numOfBFileColumns * 86;
							m_fieldCount = m_readerImpl.m_sqlMetaData.m_noOfColumns - m_readerImpl.m_numberOfHiddenColumns;
							if (m_readerImpl.m_sqlMetaData.HasLOBOrLongColumn)
							{
								m_LobImplCache = new object[m_fieldCount];
								m_LastCachedRowNumber = new long[m_fieldCount];
							}
							if (m_fillReader)
							{
								DataTable minSchemaTable = GetMinSchemaTable();
								if (minSchemaTable != null)
								{
									m_dataTableList.Add(minSchemaTable);
								}
							}
						}
						else
						{
							m_maxRowSize = (m_fieldCount = 0);
						}
						if (m_isFromEF)
						{
							PopulateExpectedTypes();
						}
					}
					else
					{
						m_expectedColumnTypes = null;
						m_isFromEF = false;
					}
				}
				else
				{
					m_expectedColumnTypes = null;
					m_isFromEF = false;
				}
				m_currentDataTableForFill = null;
				m_noMoreResults = !flag && !m_fillReader;
				return flag;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.NextResult, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.NextResult);
				}
			}
		}

		public override bool Read()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Read);
			}
			try
			{
				m_bBeginingOfFile = false;
				m_bDoneReadOne = true;
				if (m_bclosed)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (m_bEndOfFile || m_noMoreResults)
				{
					return false;
				}
				if (m_readerImpl.m_rowsFetched <= 0 && !m_readerImpl.m_bHasMoreRowsInDB)
				{
					m_readerImpl.ReleaseCursor(m_commandText);
					m_bEndOfFile = true;
					return false;
				}
				m_internalRowCounter++;
				m_RowNumber++;
				if ((m_commandBehavior & CommandBehavior.SchemaOnly) == CommandBehavior.SchemaOnly || ((m_commandBehavior & CommandBehavior.SingleRow) == CommandBehavior.SingleRow && m_internalRowCounter > 0))
				{
					if (m_readerImpl.m_sqlMetaData != null && m_readerImpl.m_sqlMetaData.HasLOBColumns)
					{
						ProcessAnyTempLOBs(m_internalRowCounter - 1);
					}
					RelRefOnAllTempLobs();
					m_readerImpl.ReleaseCursor(m_commandText);
					m_bEndOfFile = true;
					return false;
				}
				if (m_internalRowCounter < m_readerImpl.m_rowsFetched)
				{
					if (m_internalRowCounter > 0 && m_readerImpl.m_sqlMetaData != null && m_readerImpl.m_sqlMetaData.HasLOBColumns)
					{
						ProcessAnyTempLOBs(m_internalRowCounter - 1);
					}
					if (m_internalRowCounter > 0 && m_internalRowCounter < m_readerImpl.m_rowsFetched - 1)
					{
						m_readerImpl.m_dataUnmarshaller.TryOraBufRelease(m_internalRowCounter, m_connection.m_oracleConnectionImpl.m_oracleCommunication);
					}
					if (!m_isRowAddedToDatatable && m_currentDataTableForFill != null && m_currentDataTableForFill.Rows.Count > m_initialRowCnt)
					{
						m_isRowAddedToDatatable = true;
					}
					if (m_connection.m_isDb11gR1OrHigher && m_internalRowCounter <= 0 && ((m_readerImpl.m_sqlMetaData.HasLOBColumns && !m_fillReader && -1 == m_readerImpl.m_clientInitialLOBFS) || (m_fillReader && !m_returnPSTypes)))
					{
						if (m_readerImpl.m_tempOBList != null)
						{
							for (int i = 0; i < m_readerImpl.m_tempOBList.Count; i++)
							{
								m_readerImpl.m_tempOBList[i].ReturnToPool();
							}
							m_readerImpl.m_tempOBList.Clear();
						}
						m_readerImpl.DoLobArrayRead();
					}
					m_bEndOfFile = false;
					m_bHasRows = true;
					return true;
				}
				if (m_readerImpl.m_bHasMoreRowsInDB)
				{
					if (m_internalRowCounter > 0 && m_readerImpl.m_sqlMetaData != null && m_readerImpl.m_sqlMetaData.HasLOBColumns)
					{
						ProcessAnyTempLOBs(m_internalRowCounter - 1);
					}
					RelRefOnAllTempLobs();
					int noOfRowsToFetch = 25;
					if (m_maxRowSize > 0)
					{
						noOfRowsToFetch = (int)(m_fetchSize / m_maxRowSize) + 1;
					}
					if (m_readerImpl.m_tempOBList != null)
					{
						for (int j = 0; j < m_readerImpl.m_tempOBList.Count; j++)
						{
							m_readerImpl.m_tempOBList[j].ReturnToPool();
						}
						m_readerImpl.m_tempOBList.Clear();
					}
					bool num = m_readerImpl.FetchMoreRows(noOfRowsToFetch, m_fillReader, m_returnPSTypes) <= 0;
					m_connection.CheckForWarnings(this);
					if (num)
					{
						m_readerImpl.ReleaseCursor(m_commandText);
						m_bEndOfFile = true;
						return false;
					}
					if (!m_isRowAddedToDatatable && m_currentDataTableForFill != null && m_currentDataTableForFill.Rows.Count > m_initialRowCnt)
					{
						m_isRowAddedToDatatable = true;
					}
					if (m_connection.m_isDb11gR1OrHigher && ((m_readerImpl.m_sqlMetaData.HasLOBColumns && !m_fillReader && -1 == m_readerImpl.m_clientInitialLOBFS) || (m_fillReader && !m_returnPSTypes)))
					{
						m_readerImpl.DoLobArrayRead();
					}
					m_internalRowCounter = 0;
					m_bEndOfFile = false;
					m_bHasRows = true;
					return true;
				}
				if (m_internalRowCounter > 0 && m_readerImpl.m_sqlMetaData != null && m_readerImpl.m_sqlMetaData.HasLOBColumns)
				{
					ProcessAnyTempLOBs(m_internalRowCounter - 1);
				}
				RelRefOnAllTempLobs();
				m_readerImpl.ReleaseCursor(m_commandText);
				m_bEndOfFile = true;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Read, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.Read);
				}
			}
			return false;
		}

		internal void RelRefOnAllTempLobs()
		{
			for (int i = 0; i < m_tempLobFromCurrentFetch.Count; i++)
			{
				object obj = m_tempLobFromCurrentFetch[i];
				if (obj is OracleClobImpl)
				{
					((OracleClobImpl)obj).RelRef();
				}
				else if (obj is OracleBlobImpl)
				{
					((OracleBlobImpl)obj).RelRef();
				}
			}
			m_tempLobFromCurrentFetch.Clear();
		}

		internal void ProcessAnyTempLOBs(int rowNumber)
		{
			if (rowNumber >= 0)
			{
				m_readerImpl.CollectTempLOBsToBeFreed(rowNumber, m_tempLobFromCurrentFetch);
			}
		}

		private OracleDbType GetOraDbType(int i)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOraDbType);
			}
			try
			{
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				ColumnDescribeInfo columnDescribeInfo = m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i];
				OraType dataType = (OraType)columnDescribeInfo.m_dataType;
				OracleDbType oracleDbType = (OracleDbType)OracleTypeMapper.m_OraToOraDb[dataType];
				bool flag = columnDescribeInfo.m_characterSetForm == 2;
				switch (oracleDbType)
				{
				case OracleDbType.Char:
					if (flag)
					{
						oracleDbType = OracleDbType.NChar;
					}
					break;
				case OracleDbType.Varchar2:
					if (flag)
					{
						oracleDbType = OracleDbType.NVarchar2;
					}
					break;
				case OracleDbType.Clob:
					if (flag)
					{
						oracleDbType = OracleDbType.NClob;
					}
					break;
				case OracleDbType.Decimal:
				{
					int scale = columnDescribeInfo.m_scale;
					int precision = columnDescribeInfo.m_precision;
					if (scale <= 0 && precision - scale < 5)
					{
						oracleDbType = OracleDbType.Int16;
					}
					else if (scale <= 0 && precision - scale < 10)
					{
						oracleDbType = OracleDbType.Int32;
					}
					else if (scale <= 0 && precision - scale < 19)
					{
						oracleDbType = OracleDbType.Int64;
					}
					else if (precision < 8 && ((scale <= 0 && precision - scale <= 38) || (scale > 0 && scale <= 44)))
					{
						oracleDbType = OracleDbType.Single;
					}
					else if (precision < 16)
					{
						oracleDbType = OracleDbType.Double;
					}
					break;
				}
				}
				return oracleDbType;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOraDbType, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOraDbType);
				}
			}
		}

		private bool IsCorruptible(OraType oraType)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.IsCorruptible);
			}
			try
			{
				switch (oraType)
				{
				case OraType.ORA_NUMBER:
				case OraType.ORA_DATE:
				case OraType.ORA_TIMESTAMP:
				case OraType.ORA_TIMESTAMP_TZ:
				case OraType.ORA_INTERVAL_DS:
				case OraType.ORA_TIMESTAMP_LTZ:
					return true;
				default:
					return false;
				}
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.IsCorruptible, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.IsCorruptible);
				}
			}
		}

		internal DataTable GetMinSchemaTable()
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetMinSchemaTable);
			}
			try
			{
				if (m_readerImpl == null || m_readerImpl.m_sqlMetaData == null)
				{
					return null;
				}
				DataTable dataTable = null;
				if (m_sqlStatementType != 0)
				{
					if (m_refCursor != null)
					{
						RefCursorInfo refCursorInfo = m_refCursor.m_refCursorInfo;
						if (refCursorInfo != null && refCursorInfo.columnInfo.Rows.Count > 0)
						{
							dataTable = refCursorInfo.columnInfo;
						}
					}
					else
					{
						ConfigBaseClass.StoredProcedureInfo storedProcInfo = ConfigBaseClass.GetInstance(bIsManaged: true).GetStoredProcInfo(m_storedProcName);
						if (storedProcInfo != null)
						{
							dataTable = storedProcInfo.GetColumnInfo(m_readerImpl.m_currentRefCursorIndex);
						}
					}
				}
				DataTable dataTable2 = new DataTable("MinSchemaTable");
				PopulateMetaData(tryGetPKInfo: false);
				dataTable2.MinimumCapacity = m_fieldCount;
				if (m_sqlStatementType != 0)
				{
					dataTable2.ExtendedProperties["REFCursorName"] = ((m_readerImpl.m_currentRefCursorIndex == 0) ? "REFCursor" : ("REFCursor" + m_readerImpl.m_currentRefCursorIndex));
				}
				dataTable2.Columns.Add("ColumnName", typeof(string));
				dataTable2.Columns.Add("BaseColumnName", typeof(string));
				dataTable2.Columns.Add("BaseTableName", typeof(string));
				dataTable2.Columns.Add("OraDbType", typeof(OracleDbType));
				dataTable2.Columns.Add("BaseSchemaName", typeof(string));
				ColumnLocalParsePrimaryKeyInfo columnLocalParsePrimaryKeyInfo = ColumnLocalParsePrimaryKeyInfo.Null;
				bool flag = m_readerImpl.m_sqlMetaData.m_sqlMetaInfo != null && m_readerImpl.m_sqlMetaData.m_sqlMetaInfo.m_columnMetaInfo != null;
				for (int i = 0; i < m_fieldCount; i++)
				{
					DataRow dataRow = dataTable2.NewRow();
					ColumnDescribeInfo columnDescribeInfo = m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i];
					if (flag)
					{
						columnLocalParsePrimaryKeyInfo = m_readerImpl.m_sqlMetaData.m_sqlMetaInfo.m_columnMetaInfo[i];
					}
					dataRow[0] = columnDescribeInfo.pColAlias;
					dataRow[1] = columnLocalParsePrimaryKeyInfo.m_columnName;
					dataRow[2] = columnLocalParsePrimaryKeyInfo.pTabName;
					dataRow[3] = GetOraDbType(i);
					dataRow[4] = columnLocalParsePrimaryKeyInfo.m_schemaName;
					if (m_sqlStatementType != 0 && dataTable != null)
					{
						object obj = dataTable.Rows[i]["ColumnName"];
						if (obj != null && obj != DBNull.Value)
						{
							dataRow[0] = (string)obj;
						}
						object obj2 = dataTable.Rows[i]["BaseColumnName"];
						if (obj2 != null && obj2 != DBNull.Value)
						{
							dataRow[1] = (string)obj2;
						}
						object obj3 = dataTable.Rows[i]["BaseTableName"];
						if (obj3 != null && obj3 != DBNull.Value)
						{
							dataRow[2] = (string)obj3;
						}
						object obj4 = dataTable.Rows[i]["ProviderType"];
						if (obj4 != null && obj4 != DBNull.Value)
						{
							dataRow[3] = (OracleDbType)obj4;
						}
						object obj5 = dataTable.Rows[i]["BaseSchemaName"];
						if (obj5 != null && obj5 != DBNull.Value)
						{
							dataRow[4] = (string)obj5;
						}
						object obj6 = dataTable.Rows[i]["UdtTypeName"];
						if (obj6 != null && obj6 != DBNull.Value)
						{
							dataRow[5] = obj6;
						}
					}
					dataTable2.Rows.Add(dataRow);
				}
				dataTable2.AcceptChanges();
				return dataTable2;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetMinSchemaTable, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetMinSchemaTable);
				}
			}
		}

		private object ChangeType(object sourceValue, Type targetType)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.ChangeType);
			}
			try
			{
				if (sourceValue is byte[] && targetType == typeof(Guid))
				{
					return new Guid((byte[])sourceValue);
				}
				if (sourceValue is TimeSpan && targetType == typeof(decimal))
				{
					return (decimal)((TimeSpan)sourceValue).TotalSeconds;
				}
				if (sourceValue is OracleTimeStampTZ && targetType == typeof(DateTimeOffset))
				{
					OracleTimeStampTZ oracleTimeStampTZ = (OracleTimeStampTZ)sourceValue;
					if (oracleTimeStampTZ.IsNull)
					{
						return DBNull.Value;
					}
					return new DateTimeOffset(oracleTimeStampTZ.Value, oracleTimeStampTZ.GetTimeZoneOffset());
				}
				return Convert.ChangeType(sourceValue, targetType, CultureInfo.InvariantCulture);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, OracleTraceTag.Error, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.ChangeType, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.ChangeType);
				}
			}
		}

		internal string GetLongData(OracleConnection connection, int currentRow, int columnIndex, int length)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)262400, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetLongData);
			}
			try
			{
				DataUnmarshaller dtUnmarshaller = null;
				return GetLongAccessorToFetchMoreData(connection, ref currentRow, ref columnIndex, length, out dtUnmarshaller).GetString(dtUnmarshaller, currentRow, columnIndex);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, (OracleTraceTag)268697600, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetLongData, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)262656, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetLongData);
				}
			}
		}

		internal long GetLongRawData(OracleConnection connection, int currentRow, int columnIndex, long fieldOffset, ref byte[] buffer, int bufferOffset, int length, bool bAllocateBuffer)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)262400, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetLongRawData);
			}
			try
			{
				long result = 0L;
				DataUnmarshaller dtUnmarshaller = null;
				TTCLongAccessor longAccessorToFetchMoreData = GetLongAccessorToFetchMoreData(connection, ref currentRow, ref columnIndex, length, out dtUnmarshaller);
				if (!bAllocateBuffer && buffer == null)
				{
					result = longAccessorToFetchMoreData.AvailableDataSize(currentRow);
				}
				else
				{
					int num = length;
					if (buffer == null)
					{
						num = longAccessorToFetchMoreData.AvailableDataSize(currentRow);
						buffer = new byte[num];
					}
					if (num > 0)
					{
						result = longAccessorToFetchMoreData.FillDataInUserBuffer(dtUnmarshaller, currentRow, columnIndex, fieldOffset, buffer, bufferOffset, num);
					}
				}
				return result;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, (OracleTraceTag)268697600, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetLongRawData, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)262656, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetLongRawData);
				}
			}
		}

		private TTCLongAccessor GetLongAccessorToFetchMoreData(OracleConnection connection, ref int currentRow, ref int columnIndex, int length, out DataUnmarshaller dtUnmarshaller)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)262400, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetLongAccessorToFetchMoreData);
			}
			try
			{
				_ = string.Empty;
				dtUnmarshaller = null;
				string commandText;
				OracleDataReaderImpl oracleDataReaderImpl = ExecuteQueryToFetchLongData(connection, currentRow, columnIndex, length, out commandText);
				TTCLongAccessor result = null;
				if (oracleDataReaderImpl != null && oracleDataReaderImpl.m_accessors != null)
				{
					if (oracleDataReaderImpl.m_accessors[0] is TTCLongAccessor)
					{
						result = oracleDataReaderImpl.m_accessors[0] as TTCLongAccessor;
						currentRow = 0;
						columnIndex = 0;
						dtUnmarshaller = oracleDataReaderImpl.m_dataUnmarshaller;
						oracleDataReaderImpl.m_dataUnmarshaller = null;
					}
					oracleDataReaderImpl.ReleaseCursor(commandText);
				}
				else
				{
					dtUnmarshaller = m_readerImpl.m_dataUnmarshaller;
					result = m_readerImpl.m_accessors[columnIndex] as TTCLongAccessor;
				}
				return result;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, (OracleTraceTag)268697600, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetLongAccessorToFetchMoreData, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)262656, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetLongAccessorToFetchMoreData);
				}
			}
		}

		internal OracleDataReaderImpl ExecuteQueryToFetchLongData(OracleConnection connection, int currentRow, int columnIndex, int length, out string commandText)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)262400, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.ExecuteQueryToFetchLongData);
			}
			SQLMetaData sqlMetaData = m_readerImpl.m_sqlMetaData;
			OracleException exceptionForArrayBindDML = null;
			try
			{
				if (m_readerImpl.m_sqlMetaData.m_sqlMetaInfo == null || (!sqlMetaData.m_sqlMetaInfo.bPkPresent && !sqlMetaData.m_sqlMetaInfo.bRowidPresent))
				{
					SQLMetaData.GetPrimaryKey(connection, sqlMetaData, m_readerImpl.m_numberOfHiddenColumns, bSchemaTable: false);
				}
				commandText = string.Empty;
				SQLLocalParsePrimaryKeyInfo sqlMetaInfo = sqlMetaData.m_sqlMetaInfo;
				if (sqlMetaInfo == null || (!sqlMetaInfo.bPkPresent && !sqlMetaInfo.bRowidPresent))
				{
					return null;
				}
				if (sqlMetaInfo.m_tableName == null || sqlMetaInfo.m_tableName.Length == 0)
				{
					throw new OracleException(ResourceStringConstants.INT_ERR, "OracleDatReader", "GetLongData", string.Empty);
				}
				StringBuilder stringBuilder = new StringBuilder("SELECT \"");
				stringBuilder.Append(sqlMetaInfo.m_columnMetaInfo[columnIndex].m_columnName);
				stringBuilder.Append("\" from \"");
				if (sqlMetaInfo.m_schemaName != null && sqlMetaInfo.m_schemaName.Length != 0)
				{
					stringBuilder.Append(sqlMetaInfo.m_schemaName).Append("\".\"");
				}
				stringBuilder.Append(sqlMetaInfo.m_tableName).Append("\" where ");
				int num = 0;
				OracleParameterCollection oracleParameterCollection = new OracleParameterCollection();
				int num2 = sqlMetaInfo.m_columnMetaInfo.Length;
				for (int i = 0; i < num2; i++)
				{
					if (sqlMetaInfo.m_columnMetaInfo[i].bIsKeyColumn)
					{
						num++;
						if (num == 1)
						{
							stringBuilder.Append(" \"");
						}
						else
						{
							stringBuilder.Append(" and \"");
						}
						stringBuilder.Append(sqlMetaInfo.m_columnMetaInfo[i].m_columnName);
						if (m_readerImpl.m_accessors[i].IsNullIndicatorSet(m_readerImpl.m_dataUnmarshaller, m_readerImpl.m_sqlMetaData.m_noOfColumns, currentRow, i))
						{
							stringBuilder.Append("\" IS NULL");
							continue;
						}
						m_bInternalCall = true;
						object value = GetValue(i);
						m_bInternalCall = false;
						stringBuilder.Append("\" = :").Append(num.ToString());
						OracleDbType dbType = (OracleDbType)OracleTypeMapper.m_OraToOraDb[(OraType)sqlMetaData.m_columnDescribeInfo[i].m_dataType];
						oracleParameterCollection.Add(num.ToString(), dbType, value, ParameterDirection.Input);
					}
				}
				commandText = stringBuilder.ToString();
				OracleDataReaderImpl rdrImpl = null;
				OracleCommandImpl oracleCommandImpl = new OracleCommandImpl();
				bool bBindParamPresent = false;
				long internalInitialLOBFS = 0L;
				OracleLogicalTransaction oracleLogicalTransaction = null;
				oracleCommandImpl.ExecuteReader(commandText, oracleParameterCollection, CommandType.Text, m_connection.m_oracleConnectionImpl, ref rdrImpl, -1, 0L, null, m_readerImpl.m_snapshotSCN, out var _, out var _, ref bBindParamPresent, ref internalInitialLOBFS, 0L, out exceptionForArrayBindDML, m_connection, ref oracleLogicalTransaction, null);
				if (rdrImpl != null && rdrImpl.m_rowsFetched <= 0 && rdrImpl.m_bHasMoreRowsInDB)
				{
					rdrImpl.FetchMoreRows(1, m_fillReader, m_returnPSTypes);
					m_connection.CheckForWarnings(this);
				}
				return rdrImpl;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, (OracleTraceTag)268697600, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.ExecuteQueryToFetchLongData, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)262656, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.ExecuteQueryToFetchLongData);
				}
			}
		}

		internal byte[] GetOracleLobForUpdate(int i, int wait)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)262400, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleLobForUpdate);
			}
			byte[] result = null;
			SQLLocalParsePrimaryKeyInfo sQLLocalParsePrimaryKeyInfo = null;
			OracleCommand oracleCommand = null;
			OracleDataReader oracleDataReader = null;
			try
			{
				if (m_bclosed || m_bBeginingOfFile || m_bEndOfFile)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.OBJECT_CLOSED));
				}
				if (i >= m_fieldCount || i < 0)
				{
					throw new IndexOutOfRangeException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_INV_COL_INDEX));
				}
				if (m_internalRowCounter < 0)
				{
					throw new InvalidOperationException(OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.DR_NO_READ_CALLED));
				}
				if (-1 == m_readerImpl.m_clientInitialLOBFS && ConfigBaseClass.m_bLegacyNegativeOneILFSBehavior)
				{
					throw new InvalidCastException();
				}
				oracleCommand = m_connection.CreateCommand();
				if (m_readerImpl.m_sqlMetaData.m_sqlMetaInfo == null || (!m_readerImpl.m_sqlMetaData.m_sqlMetaInfo.bPkPresent && !m_readerImpl.m_sqlMetaData.m_sqlMetaInfo.bRowidPresent))
				{
					SQLMetaData.GetPrimaryKey(m_connection, m_readerImpl.m_sqlMetaData, m_readerImpl.m_numberOfHiddenColumns, bSchemaTable: false);
				}
				sQLLocalParsePrimaryKeyInfo = m_readerImpl.m_sqlMetaData.m_sqlMetaInfo;
				if (sQLLocalParsePrimaryKeyInfo == null || (!sQLLocalParsePrimaryKeyInfo.bPkPresent && !sQLLocalParsePrimaryKeyInfo.bRowidPresent))
				{
					throw new OracleException(ResourceStringConstants.DAC_PK_REQUIRED, string.Empty, string.Empty, string.Empty);
				}
				int num = 0;
				int num2 = sQLLocalParsePrimaryKeyInfo.m_columnMetaInfo.Length;
				StringBuilder stringBuilder = new StringBuilder("SELECT \"", 512);
				stringBuilder.Append(sQLLocalParsePrimaryKeyInfo.m_columnMetaInfo[i].m_columnName).Append("\" FROM \"");
				stringBuilder.Append((sQLLocalParsePrimaryKeyInfo.m_schemaName == null) ? string.Empty : sQLLocalParsePrimaryKeyInfo.m_schemaName);
				stringBuilder.Append((sQLLocalParsePrimaryKeyInfo.m_schemaName == null) ? string.Empty : "\".\"");
				stringBuilder.Append(sQLLocalParsePrimaryKeyInfo.m_tableName).Append("\" WHERE ");
				for (int j = 0; j < num2; j++)
				{
					if (sQLLocalParsePrimaryKeyInfo.m_columnMetaInfo[j].bIsKeyColumn)
					{
						num++;
						if (num == 1)
						{
							stringBuilder.Append("\"");
						}
						else
						{
							stringBuilder.Append(" AND \"");
						}
						stringBuilder.Append(sQLLocalParsePrimaryKeyInfo.m_columnMetaInfo[j].m_columnName);
						m_bInternalCall = true;
						object value = GetValue(j);
						m_bInternalCall = false;
						stringBuilder.Append("\" = :").Append(num.ToString());
						OracleDbType dbType = (OracleDbType)OracleTypeMapper.m_OraToOraDb[(OraType)m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[j].m_dataType];
						oracleCommand.Parameters.Add(num.ToString(), dbType, value, ParameterDirection.Input);
					}
				}
				stringBuilder.Append(" FOR UPDATE");
				switch (wait)
				{
				case 0:
					stringBuilder.Append(" NOWAIT");
					break;
				default:
					stringBuilder.Append(" WAIT ").Append(wait.ToString());
					break;
				case -1:
					break;
				}
				oracleCommand.CommandText = stringBuilder.ToString();
				oracleDataReader = oracleCommand.ExecuteReader();
				if (oracleDataReader.Read())
				{
					if (!oracleDataReader.IsDBNull(0))
					{
						result = oracleDataReader.m_readerImpl.GetLobLocator(0, 0);
					}
					return result;
				}
				throw new OracleException(ResourceStringConstants.DR_NO_READ_CALLED, string.Empty, string.Empty, string.Empty);
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Private, (OracleTraceTag)268697600, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleLobForUpdate, ex);
				throw;
			}
			finally
			{
				if (oracleCommand != null)
				{
					foreach (OracleParameter parameter in oracleCommand.Parameters)
					{
						parameter.Dispose();
					}
					oracleCommand.Dispose();
				}
				oracleDataReader?.Dispose();
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)262656, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetOracleLobForUpdate);
				}
			}
		}

		internal void GetEdmMappingConfigValues()
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetEdmMappingConfigValues);
			}
			int num = 0;
			if ((num = ConfigBaseClass.GetMaxPrecision("BOOL")) > 0)
			{
				m_edmMappingMaxBOOL = num;
				m_bMapNumberToBoolean = true;
			}
			int num2 = 0;
			if ((num2 = ConfigBaseClass.GetMaxPrecision("BYTE")) > 0)
			{
				m_edmMappingMaxBYTE = num2;
				m_bMapNumberToByte = true;
			}
			int num3 = 0;
			if ((num3 = ConfigBaseClass.GetMaxPrecision("INT16")) > 0)
			{
				m_edmMappingMaxINT16 = num3;
			}
			int num4 = 0;
			if ((num4 = ConfigBaseClass.GetMaxPrecision("INT32")) > 0)
			{
				m_edmMappingMaxINT32 = num4;
			}
			int num5 = 0;
			if ((num5 = ConfigBaseClass.GetMaxPrecision("INT64")) > 0)
			{
				m_edmMappingMaxINT64 = num5;
			}
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.GetEdmMappingConfigValues);
			}
		}

		internal void PopulateExpectedTypes()
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.PopulateExpectedTypes);
			}
			if (m_fieldCount > 0)
			{
				m_expectedColumnTypes = new Type[m_fieldCount];
				for (int i = 0; i < m_fieldCount; i++)
				{
					OraType dataType = (OraType)m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i].m_dataType;
					if (dataType != OraType.ORA_NUMBER)
					{
						m_expectedColumnTypes[i] = (Type)OracleTypeMapper.m_OraToNET[dataType];
						continue;
					}
					int precision = m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i].m_precision;
					int scale = m_readerImpl.m_sqlMetaData.m_columnDescribeInfo[i].m_scale;
					if (precision == 1 && scale == 0)
					{
						if (m_bMapNumberToBoolean && precision <= m_edmMappingMaxBOOL)
						{
							m_expectedColumnTypes[i] = Type.GetType("System.Boolean");
						}
						else if (m_bMapNumberToByte && precision <= m_edmMappingMaxBYTE)
						{
							m_expectedColumnTypes[i] = Type.GetType("System.Byte");
						}
						else
						{
							m_expectedColumnTypes[i] = Type.GetType("System.Int16");
						}
					}
					else if (m_bMapNumberToByte && scale == 0 && precision <= m_edmMappingMaxBYTE)
					{
						m_expectedColumnTypes[i] = Type.GetType("System.Byte");
					}
					else if (scale == 0 && precision <= m_edmMappingMaxINT16)
					{
						m_expectedColumnTypes[i] = Type.GetType("System.Int16");
					}
					else if (scale == 0 && precision <= m_edmMappingMaxINT32)
					{
						m_expectedColumnTypes[i] = Type.GetType("System.Int32");
					}
					else if (scale == 0 && precision <= m_edmMappingMaxINT64)
					{
						m_expectedColumnTypes[i] = Type.GetType("System.Int64");
					}
					else
					{
						m_expectedColumnTypes[i] = Type.GetType("System.Decimal");
					}
				}
			}
			else
			{
				m_expectedColumnTypes = null;
			}
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleDataReader, OracleTraceFuncName.PopulateExpectedTypes);
			}
		}
	}
}
